Привет. Есть такое правило:
KERNEL=="sd*", ENV{ID_VENDOR}=="SCST_FIO", RUN+="/bin/echo 64 > /sys/block/%k/queue/max_sectors_kb"
Не работает.
Пробовал и вот так:
KERNEL=="sd*", SUBSYSTEM=="block", ATTRS{vendor}=="SCST_FIO" RUN+="/bin/echo 64 > /sys/block/%k/queue/max_sectors_kb"
А вот udevadm test /block/sdh отрабатывает:
udevadm test /block/sdh
calling: test
version 204
This program is for debugging only, it does not run any program
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.
=== trie on-disk ===
tool version: 204
file size: 5662556 bytes
header size 80 bytes
strings 1265740 bytes
nodes 4396736 bytes
load module index
read rules file: /lib/udev/rules.d/40-bridge-network-interface.rules
read rules file: /lib/udev/rules.d/40-crda.rules
read rules file: /lib/udev/rules.d/40-gnupg.rules
read rules file: /lib/udev/rules.d/40-hyperv-hotadd.rules
read rules file: /lib/udev/rules.d/40-qemu-system-common.rules
read rules file: /lib/udev/rules.d/40-vlan-network-interface.rules
read rules file: /lib/udev/rules.d/42-usb-hid-pm.rules
read rules file: /lib/udev/rules.d/50-firmware.rules
read rules file: /lib/udev/rules.d/50-udev-default.rules
read rules file: /lib/udev/rules.d/55-dm.rules
read rules file: /lib/udev/rules.d/56-lvm.rules
read rules file: /lib/udev/rules.d/60-cdrom_id.rules
read rules file: /lib/udev/rules.d/60-keyboard.rules
read rules file: /lib/udev/rules.d/60-persistent-alsa.rules
read rules file: /lib/udev/rules.d/60-persistent-input.rules
read rules file: /lib/udev/rules.d/60-persistent-serial.rules
read rules file: /lib/udev/rules.d/60-persistent-storage-dm.rules
read rules file: /lib/udev/rules.d/60-persistent-storage-tape.rules
read rules file: /lib/udev/rules.d/60-persistent-storage.rules
read rules file: /lib/udev/rules.d/60-persistent-v4l.rules
read rules file: /lib/udev/rules.d/61-accelerometer.rules
read rules file: /lib/udev/rules.d/62-google-cloudimg.rules
read rules file: /lib/udev/rules.d/64-btrfs.rules
read rules file: /lib/udev/rules.d/64-md-raid.rules
read rules file: /lib/udev/rules.d/70-btrfs.rules
read rules file: /etc/udev/rules.d/70-persistent-net.rules
read rules file: /lib/udev/rules.d/70-power-switch.rules
read rules file: /lib/udev/rules.d/70-uaccess.rules
read rules file: /lib/udev/rules.d/71-seat.rules
read rules file: /lib/udev/rules.d/73-idrac.rules
read rules file: /lib/udev/rules.d/73-seat-late.rules
read rules file: /lib/udev/rules.d/75-net-description.rules
read rules file: /lib/udev/rules.d/75-persistent-net-generator.rules
read rules file: /lib/udev/rules.d/75-probe_mtd.rules
read rules file: /lib/udev/rules.d/75-tty-description.rules
read rules file: /lib/udev/rules.d/78-graphics-card.rules
read rules file: /lib/udev/rules.d/78-sound-card.rules
read rules file: /lib/udev/rules.d/80-btrfs-lvm.rules
read rules file: /lib/udev/rules.d/80-drivers.rules
read rules file: /lib/udev/rules.d/85-hdparm.rules
read rules file: /lib/udev/rules.d/85-keyboard-configuration.rules
read rules file: /lib/udev/rules.d/85-lvm2.rules
read rules file: /lib/udev/rules.d/85-regulatory.rules
read rules file: /lib/udev/rules.d/95-kpartx.rules
read rules file: /lib/udev/rules.d/95-udev-late.rules
read rules file: /etc/udev/rules.d/9999-iscsi.rules
rules contain 24576 bytes tokens (2048 * 12 bytes), 13056 bytes strings
2018 strings (25067 bytes), 1314 de-duplicated (12716 bytes), 705 trie nodes used
GROUP 6 /lib/udev/rules.d/50-udev-default.rules:50
IMPORT 'scsi_id --export --whitelisted -d /dev/sdh' /lib/udev/rules.d/60-persistent-storage.rules:41
starting 'scsi_id --export --whitelisted -d /dev/sdh'
'scsi_id --export --whitelisted -d /dev/sdh' [30097] exit with return code 0
LINK 'disk/by-id/scsi-26161623165303163' /lib/udev/rules.d/60-persistent-storage.rules:43
IMPORT builtin 'path_id' /lib/udev/rules.d/60-persistent-storage.rules:57
LINK 'disk/by-path/ip-10.101.0.197:3260-iscsi-iqn.2010-10.org.openstack:volume-918cae80-ab6f-4399-9edf-868821849ce7-lun-1' /lib/udev/rules.d/60-persistent-storage.rules:58
IMPORT builtin 'blkid' /lib/udev/rules.d/60-persistent-storage.rules:72
probe /dev/sdh raid offset=0
RUN '/lib/udev/hdparm' /lib/udev/rules.d/85-hdparm.rules:2
RUN '/sbin/modprobe -qba dm-multipath' /lib/udev/rules.d/95-kpartx.rules:10
RUN '/bin/echo 64 > /sys/block/%k/queue/max_sectors_kb' /etc/udev/rules.d/9999-iscsi.rules:1
RUN '/bin/echo noop > /sys/block/%k/queue/scheduler' /etc/udev/rules.d/9999-iscsi.rules:2
handling device node '/dev/sdh', devnum=b8:112, mode=0660, uid=0, gid=6
preserve permissions /dev/sdh, 060660, uid=0, gid=6
preserve already existing symlink '/dev/block/8:112' to '../sdh'
found 'b8:112' claiming '/run/udev/links/\x2fdisk\x2fby-id\x2fscsi-26161623165303163'
creating link '/dev/disk/by-id/scsi-26161623165303163' to '/dev/sdh'
preserve already existing symlink '/dev/disk/by-id/scsi-26161623165303163' to '../../sdh'
found 'b8:112' claiming '/run/udev/links/\x2fdisk\x2fby-path\x2fip-10.101.0.197:3260-iscsi-iqn.2010-10.org.openstack:volume-918cae80-ab6f-4399-9edf-868821849ce7-lun-1'
creating link '/dev/disk/by-path/ip-10.101.0.197:3260-iscsi-iqn.2010-10.org.openstack:volume-918cae80-ab6f-4399-9edf-868821849ce7-lun-1' to '/dev/sdh'
preserve already existing symlink '/dev/disk/by-path/ip-10.101.0.197:3260-iscsi-iqn.2010-10.org.openstack:volume-918cae80-ab6f-4399-9edf-868821849ce7-lun-1' to '../../sdh'
ACTION=add
DEVLINKS=/dev/disk/by-id/scsi-26161623165303163 /dev/disk/by-path/ip-10.101.0.197:3260-iscsi-iqn.2010-10.org.openstack:volume-918cae80-ab6f-4399-9edf-868821849ce7-lun-1
DEVNAME=/dev/sdh
DEVPATH=/devices/platform/host33/session28/target33:0:0/33:0:0:1/block/sdh
DEVTYPE=disk
ID_BUS=scsi
ID_MODEL=disk40
ID_MODEL_ENC=disk40\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
ID_PART_TABLE_TYPE=dos
ID_PATH=ip-10.101.0.197:3260-iscsi-iqn.2010-10.org.openstack:volume-918cae80-ab6f-4399-9edf-868821849ce7-lun-1
ID_PATH_TAG=ip-10_101_0_197_3260-iscsi-iqn_2010-10_org_openstack_volume-918cae80-ab6f-4399-9edf-868821849ce7-lun-1
ID_REVISION=300
ID_SCSI=1
ID_SCSI_SERIAL=aab1e01c
ID_SERIAL=26161623165303163
ID_SERIAL_SHORT=6161623165303163
ID_TYPE=disk
ID_VENDOR=SCST_FIO
ID_VENDOR_ENC=SCST_FIO
MAJOR=8
MINOR=112
SUBSYSTEM=block
USEC_INITIALIZED=43885550264
nomdmonddf=1
nomdmonisw=1
run: '/lib/udev/hdparm'
run: '/sbin/modprobe -qba dm-multipath'
run: '/bin/echo 64 > /sys/block/sdh/queue/max_sectors_kb'
run: '/bin/echo noop > /sys/block/sdh/queue/scheduler'
unload module index
Да, пробовал все из RUN выность в шелоскрипт, все-равно не работает.
В чем может быть проблема?