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?


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.

  • Additions to an answer: ENV{ID_BUS} is also customizable and should be "yyy"; when naming the rule file, try udevadm test /sys/block/sda to be sure that your rule is applied after all others.
    – abyss.7
    Jan 28 '13 at 7:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.