You are not logged in.
Hi all,
For some time i've used an udev rule to boost the transfer speed of a particular usb stick:
SUBSYSTEM=="block", ATTRS{model}=="Cruzer Contour ", RUN+="/bin/sh -c '/bin/echo 1024 > /sys/block/%k/device/max_sectors'"Write speeds went from about 25MBps to a nice 29MBps.
So i tried another very cheap stick and it went from 13 to 25 (!)
...so i tried another, even cheaper stick and it went from 4.9 to 5.1 by setting max_sectors to 480 (defaults was 240).
In the end, i'd like to set all of the usb stick i plug to transfer 480 sectors at once instead of the default 240.
how could this be done via udev without affecting other usb devices?
Thanks.
Edit-
i tried this:
SUBSYSTEM=="block", ATTRS{max_sectors}=="240", ATTRS{removable}=="1", RUN+="/bin/sh -c '/bin/echo 480 > /sys/block/%k/device/max_sectors'"but it doesn't work
While this one does:
SUBSYSTEM=="block", ATTRS{max_sectors}=="240", RUN+="/bin/sh -c '/bin/echo 480 > /sys/block/%k/device/max_sectors'"...seems that i am missing something; how can i specify multiple attrs?
Last edited by kokoko3k (2014-08-18 19:41:12)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
All the ATTRS must be from the same parent. Note your rule also matches partitions.
I suggest you use something like
KERNEL=="sd?", ATTR{removable}=="1", ATTRS{max_sectors}=="240", RUN+="..."Offline
Moving to Kernel and Hardware...
Offline
All the ATTRS must be from the same parent. Note your rule also matches partitions.
I suggest you use something likeKERNEL=="sd?", ATTR{removable}=="1", ATTRS{max_sectors}=="240", RUN+="..."
Thanks, marking as solved ![]()
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Okay, why an external usb hdd isn't seen as removable by udev?
going to drop the removable ATTR from the rule, or somebody has a better idea?
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline