I have an SSD main disk and I want to use noop
IO scheduler with it, like this:
echo noop > /sys/block/sda/queue/scheduler
But this setting gets lost after reboot. What is a right place to save this setting in Fedora 18? Or, may be, on linux in general?
Answer
The best way to do this is with a udev
rule. Add a file to /etc/udev/rules.d
with a rule that looks something like this:
ACTION=="add", SUBSYSTEM=="block", ENV{ID_BUS}=="scsi", ENV{ID_SERIAL}=="xxx", ATTR{queue/scheduler}="noop"
Obviously you should replace xxx
with the correct serial number for the disk in question. You can find that, and other attributes you could match on, with:
udevadm info --path=/sys/block/sda --query=property
The advantage of using udev
to do this, and matching on attributes like the disk serial number, is that it won't matter if it doesn't always appear at sda
.
No comments:
Post a Comment