私のルール
KERNEL=="sd*",ACTION=="add|change",ATTRS{model}=="PERC_H755N_Front",\
ATTR{queue/nomerges}="2",\
ATTR{queue/nr_requests}="1023",\
ATTR{queue/rotational}="0",\
ATTR{queue/rq_affinity}="2",\
ATTR{queue/scheduler}="none",\
ATTR{queue/add_random}="0",ATTR{queue/max_sectors_kb}="4096"
KERNEL=="sd*",ACTION=="add|change",ATTRS{model}=="Dell Ent NVMe v2",\
ATTR{queue/nomerges}="2",\
ATTR{queue/nr_requests}="1023",\
ATTR{queue/rotational}="0",\
ATTR{queue/rq_affinity}="2",\
ATTR{queue/scheduler}="none",\
ATTR{queue/add_random}="0",ATTR{queue/max_sectors_kb}="4096"
SUBSYSTEM=="block",ACTION=="add|change",KERNEL=="nvme*[0-9]n*[0-9]",ATTRS{model}=="Dell Ent NVMe v2 AGN RI U.2 1.92TB",\
ATTR{queue/nomerges}="2",\
ATTR{queue/nr_requests}="1023",\
ATTR{queue/rotational}="0",\
ATTR{queue/rq_affinity}="2",\
ATTR{queue/scheduler}="none",\
ATTR{queue/add_random}="0",\
ATTR{queue/max_sectors_kb}="4096"
SUBSYSTEM=="block",ACTION=="add|change",KERNEL=="md*",\
ATTR{md/sync_speed_max}="2000000",\
ATTR{md/group_thread_cnt}="64",\
ATTR{md/stripe_cache_size}="8192",\
ATTR{queue/nomerges}="2",\
ATTR{queue/nr_requests}="1023",\
ATTR{queue/rotational}="0",\
ATTR{queue/rq_affinity}="2",\
ATTR{queue/scheduler}="none",\
ATTR{queue/add_random}="0", ATTR{queue/max_sectors_kb}="4096"
問題の説明
この場合、特に上部のPERCに興味があります。私が実行したら、udevadm control --reload-rules && udevadm trigger
すべてが大丈夫です。しかし、再起動時に、みんなルールが適用されますとは別にnr_requests
理由を理解できないようです。以下は完全なテストシーケンスです。ルールを手動で実行すると、すべてが正しく適用されることがわかります。しかし、再起動後もnr_requests
まだ5089に誤って設定されています。nr_requests
他のすべてが設定されますが、そうでない方法でこのプロパティを特別にするものは何も考えられません。
テスト
[root@r7525 ~]# reboot
Using username "root".
[email protected]'s password:
Activate the web console with: systemctl enable --now cockpit.socket
Register this system with Red Hat Insights: insights-client --register
Create an account or view all your systems at https://red.ht/insights-dashboard
Last login: Fri Sep 16 13:06:28 2022 from 10.8.0.6
[root@r7525 ~]# cat /sys/block/sda/queue/nr_requests
5089
[root@r7525 ~]# cat /sys/block/sda/queue/nomerges
2
[root@r7525 ~]# cat /sys/block/sda/queue/rotational
0
[root@r7525 ~]# cat /sys/block/sda/queue/rq_affinity
2
[root@r7525 ~]# cat /sys/block/sda/queue/scheduler
[none] mq-deadline kyber bfq
[root@r7525 ~]# cat /sys/block/sda/queue/add_random
0
[root@r7525 ~]# udevadm control --reload-rules && udevadm trigger
[root@r7525 ~]# cat /sys/block/sda/queue/nr_requests
1023
[root@r7525 ~]# mv /etc/udev/rules.d/99-my.rules /root
[root@r7525 ~]# reboot
Using username "root".
[email protected]'s password:
Activate the web console with: systemctl enable --now cockpit.socket
Register this system with Red Hat Insights: insights-client --register
Create an account or view all your systems at https://red.ht/insights-dashboard
Last login: Fri Sep 16 13:41:47 2022 from 10.8.0.6
[root@r7525 ~]# cat /sys/block/sda/queue/nr_requests
256
[root@r7525 ~]# cat /sys/block/sda/queue/nomerges
2
[root@r7525 ~]# cat /sys/block/sda/queue/rq_affinity
1
[root@r7525 ~]# cat /sys/block/sda/queue/scheduler
[mq-deadline] kyber bfq none
[root@r7525 ~]# cat /sys/block/sda/queue/add_random
0
[root@r7525 ~]# mv /root/99-my.rules /etc/udev/rules.d/
[root@r7525 ~]# udevadm control --reload-rules && udevadm trigger
[root@r7525 ~]# cat /sys/block/sda/queue/nr_requests
1023
[root@r7525 ~]# cat /sys/block/sda/queue/nomerges
2
[root@r7525 ~]# cat /sys/block/sda/queue/rq_affinity
2
[root@r7525 ~]# cat /sys/block/sda/queue/scheduler
[none] mq-deadline kyber bfq
[root@r7525 ~]# cat /sys/block/sda/queue/add_random
0
[root@r7525 ~]# reboot
Using username "root".
[email protected]'s password:
Activate the web console with: systemctl enable --now cockpit.socket
Register this system with Red Hat Insights: insights-client --register
Create an account or view all your systems at https://red.ht/insights-dashboard
Last login: Fri Sep 16 13:47:53 2022 from 10.8.0.6
[root@r7525 ~]# cat /sys/block/sda/queue/nr_requests
5089
[root@r7525 ~]# cat /sys/block/sda/queue/nomerges
2
[root@r7525 ~]# cat /sys/block/sda/queue/rq_affinity
2
[root@r7525 ~]# cat /sys/block/sda/queue/scheduler
[none] mq-deadline kyber bfq
[root@r7525 ~]# cat /sys/block/sda/queue/add_random
0
答え1
以降(または前)のルールによってオーバーライドできます。 =代わりに:=を試して問題が「修正」されていることを確認してください。