Slow starting USB storage in Linux
I have this USB hard drive enclosure that can also share the files on the
local network (LAN DRIVE HD9-U2LA, vendor id - 05e3:0702). Due to that it
has an operating system and some other software inside. Unfortunately this
software is rather slow to start and that cause the following kernel error
when trying to mount this enclosure:
[90459.236000] usb 5-5: new high speed USB device using ehci_hcd
and address 9
[90459.368000] usb 5-5: configuration #1 chosen from
1 choice
[90459.368000] scsi4 : SCSI emulation for USB Mass
Storage devices
[90459.368000] usb-storage: device found at 9
[90459.368000] usb-storage: waiting for device to settle before
scanning
[90464.368000] usb-storage: device scan complete
[90470.148000] usb 5-5: USB disconnect, address 9
[90470.148000] scsi 4:0:0:0: scsi: Device offlined - not ready
after error recovery
The device is fine, it is just slow to start. To work around this bug you can change /sys/module/usb_storage/parameters/delay_use from a default 5 second delay to something larger. 15 seconds worked fine in my case.
echo 15 | sudo tee
/sys/module/usb_storage/parameters/delay_use
Update:
To do that permanently, create a file in
/etc/modprobe.d (with a name slow_storage for example) that
contains such line:
options usb_storage delay_use=15