1

My Rules

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"

Problem Description

In this case, I'm specifically interested in the one for the PERC at the top. If I run udevadm control --reload-rules && udevadm trigger everything applies just fine. However on reboot, all rules apply except the one for nr_requests and I can't seem to figure out why. A full sequence of my testing is below and you can see that as soon as I manually trigger the rules everything applies correctly. However, on reboot, nr_requests is still set incorrectly to 5089. I can't think of anything that makes the property nr_requests special in a way that everything else would set but not it.

Testing

[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 Answer 1

0

It's probably overwritten by a later (or earlier) rule. Try := instead of = to see if that "fixes" it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .