Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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