1

I am having a problem creating a udev rule that sets max_sectors_kb to 1024 for sd* (sda,sdb,sdc etc...) devices under /sys/block/.

Specifically, a recent kernel change means the max IO is too large for my iSCSI SAN so I am trying to set it to 1024 on startup.

I have tried the following from articles online, but none seem to have an effect.

ACTION==”add|change”, SUBSYSTEM==”block”, RUN+=”/bin/sh -c ‘/bin/echo 1024 > /sys%p/queue/max_sectors_kb’”

or

ACTION=="add", ENV{ID_FS_USAGE}!="filesystem", ENV{ID_PATH}=="-iscsi-", RUN+="/bin/sh -c 'echo 64 > /sys$DEVPATH/queue/max_sectors_kb'"

When I run cat cat /sys/block/sdX/queue/max_sectors_kb the value is still the 32767 default.

What do I need to do?

HBruijn
  • 72,524
  • 21
  • 127
  • 192
tomstephens89
  • 981
  • 1
  • 11
  • 23

1 Answers1

0

I found that in Proxmox VE 4.2 udev was failing to start at all.

This is why my rules were not applying.

tomstephens89
  • 981
  • 1
  • 11
  • 23