Udev rule for changing 'max_sectors_kb' for all 'sd*' devices

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’”


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?


Category: udev Time: 2016-07-28 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.191 (s). 12 q(s)