Udev Rules not working

Hi ,
it seems anything I put in udev rules are not working

For example

kate /etc/udev/rules.d/60-ioschedulers.rules

# set scheduler for NVMe
ACTION==“add|change”, KERNEL==“nvme[0-9]n[0-9]”, ATTR{queue/scheduler}=“none”
# set scheduler for SSD and eMMC
ACTION==“add|change”, KERNEL==“sd[a-z]*|mmcblk[0-9]*”, ATTR{queue/rotational}==“0”, ATTR{queue/scheduler}=“mq-deadline”
# set scheduler for rotating disks
ACTION==“add|change”, KERNEL==“sd[a-z]*”, ATTR{queue/rotational}==“1”, ATTR{queue/scheduler}=“bfq”

cat /sys/block/nvme0n1/queue/scheduler                                                                                                                                                                
mq-deadline kyber [bfq] none

Any Idea how to fix it?

my nvme - line looks like this and is working:

# set mq-deadline scheduler for non-rotating nvme-disks
ACTION=="add|change", KERNEL=="nvme[0-9]n1", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="mq-deadline"

The problem is not with the rules but with UDEV since the rules are not triggering while the service is running

Just to eliminate the simplest possibility, have you rebooted (or reloaded udev rules with sudo udevadm trigger)?

is ok is fixed ,
The problem was that I have used copy paste and I think something went wrong in KATE but when I have used a plain text editor like gedit or nano it worked.

Below you can find my udev rules that sets read_ahead as well for faster perfomance

set scheduler for NVMe

ACTION==“add|change”, KERNEL==“nvme[0-9]n[0-9]”, ATTR{queue/scheduler}=“none”,ATTR{bdi/read_ahead_kb}=“4096”

set scheduler for SSD and eMMC

ACTION==“add|change”, KERNEL==“sd[a-z]|mmcblk[0-9]”, ATTR{queue/rotational}==“0”, ATTR{queue/scheduler}=“mq-deadline”,ATTR{bdi/read_ahead_kb}=“4096”

set scheduler for rotating disks

ACTION==“add|change”, KERNEL==“sd[a-z]*”, ATTR{queue/rotational}==“1”, ATTR{queue/scheduler}=“bfq”,ATTR{bdi/read_ahead_kb}=“2096”

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.