Making USB Mass Storage behave like Windows
Posted: Tue Aug 19, 2008 5:32 pm
Okay I know, heresy right? Well we live in a world where manufacturers make the assumption that we run Windows.
This can cause problems because the Linux kernel makes the assumption that devices will work sensibly.
Background info : Windows automatically transfers no more than 32k of data to/from usb mass storage devices (usb pendrives, external hdds etc). Linux uses a default of nearly double that. Unfortunately some usb sticks and other devices (yes even USB2 ones) will fall over and corrupt the filesystem on the device and can even make the device unusable.
The solution : make a file (as superuser) in /etc/udev/rules.d/ called something like 99-usbwinsectsize.rules containing the following :
Now, this is VERY generic and will possibly slow down big transfers on better devices, but at least it won't make expensive devices that work perfectly well with Windows die. (I lost one 8Gb USB Stick to this "issue" in January, and am revisiting it because of Elyssa install on my EEE)
Could we make this sticky, and Clem, any chance of including this in the next release of Mint, as it really makes Mint more reliable with certain hardware.
This can cause problems because the Linux kernel makes the assumption that devices will work sensibly.
Background info : Windows automatically transfers no more than 32k of data to/from usb mass storage devices (usb pendrives, external hdds etc). Linux uses a default of nearly double that. Unfortunately some usb sticks and other devices (yes even USB2 ones) will fall over and corrupt the filesystem on the device and can even make the device unusable.
The solution : make a file (as superuser) in /etc/udev/rules.d/ called something like 99-usbwinsectsize.rules containing the following :
Code: Select all
DRIVERS=="usb-storage", RUN+="/bin/sh -c '/bin/echo 128 > /sys/block/%k/device/max_sectors'"
Could we make this sticky, and Clem, any chance of including this in the next release of Mint, as it really makes Mint more reliable with certain hardware.