
James Harper <james.harper@bendigoit.com.au> writes:
What is the recommended way of setting values in /sys these days? Specifically, scheduler and read_ahead_kb for specific disks. I can write a few udev rules if required but it seems a bit clumsy...
I used sysfsutils, which has a /sys equivalent of /etc/sysctl.conf.
Hmmm... I can say something like: devices/pci0000:00/0000:00:11.0/ata3/host2/target2:0:0/2:0:0:0/block/sdc/queue/scheduler = deadline but then that breaks if I attach a USB disk and the disk is no longer sdc, although at least it would fail rather than give the setting to the wrong disk like block/sdc would. I tried putting a * in place of the sdc but that didn't work either. I'll have a play with the init.d script where the magic happens... might be a way to do lookups from dev so that something like: block/{/dev/disk/by-id/scsi-SATA_ST2000NM0011_Z1P04TWS}/queue/scheduler = deadline could work... James