利用udev设置一个磁盘的scheduler,
新建一个/etc/udev/rules.d/io_scheduler.rules,内容如下, “#”开始的为注释内容,仅供参考
udevadm trigger —name-match=sda 生效,重启以后也有效。
[root@zjx86r06n01 rules.d]# ll
total 20
-rw-r—r— 1 root root 76 May 29 14:45 05-udev-pp.rules
-rw-r—r—. 1 root root 153 Feb 27 2017 60-ipath.rules
-rw-r—r—. 1 root root 709 May 31 2017 70-persistent-ipoib.rules
-rw-r—r— 1 root root 258 May 29 14:46 80-udev-pp-xio.rules
-rw-r—r— 1 root root 380 May 29 14:39 io_scheduler.rules
[root@zjx86r06n01 rules.d]# cat io_scheduler.rules
ACTION==”add|change”, KERNEL==”emcpowera”, ATTR{queue/scheduler}=”deadline”
ACTION==”add|change”, KERNEL==”emcpowerb”, ATTR{queue/scheduler}=”deadline”
ACTION==”add|change”, KERNEL==”emcpowerc”, ATTR{queue/scheduler}=”deadline”
ACTION==”add|change”, KERNEL==”emcpowerd”, ATTR{queue/scheduler}=”deadline”
ACTION==”add|change”, KERNEL==”emcpowere”, ATTR{queue/scheduler}=”deadline”
[root@zjx86r06n01 rules.d]#
[root@zjx86r06n01 ~]#
[root@zjx86r06n01 ~]# cat /sys/block/emcpowera/queue/scheduler
noop [deadline] cfq
[root@zjx86r06n01 ~]# cat /sys/block/emcpowerb/queue/scheduler
noop [deadline] cfq
[root@zjx86r06n01 ~]#
https://blog.csdn.net/sinat_38723234/article/details/105134482