[nSLUG] USB storage hot-swap question

George N. White III gnwiii at gmail.com
Sat May 17 15:08:26 ADT 2008


On Sat, May 17, 2008 at 1:54 PM, Mike Spencer <mspencer at tallships.ca> wrote:

> I can plug in a USB memory stick (thumb-drive, whatever, hereinafter
> "device"), mount it, read from or write to it and umount it.  I can
> re-mount it, with or without physically unplugging and replugging the
> device.
>
> All  is well.
>
> But if I umount the device, unplug it and plug in another device,
> mount refuses to mount it, reporting that it is "is not a valid block
> device".
>
> "cat /proc/scsi/scsi"  now shows  both devices as:
>
>    Host: scsi1 Channel: 00 Id: 00 Lun: 00
>      Vendor: USB2.0   Model: Mobile Disk      Rev: 1.00
>      Type:   Direct-Access                    ANSI SCSI revision: 02
>    Host: scsi2 Channel: 00 Id: 00 Lun: 00
>      Vendor: Kingston Model: DataTraveler 2.0 Rev: 6.16
>      Type:   Direct-Access                    ANSI SCSI revision: 02
>
> The only way I've figured out to mount the second device is to
> modprobe -r the usb-storage module and the modprobe it back in.  Then
> the second device can be mounted/umounted.  But now the first device
> "is not a valid block device" if I re-insert it and try to mount it.
>
> Is this the way things are supposed to be?  Or have I missed something
> along the way?  I thought these USB storage devices were supposed to be
> transparently hot-swappable.

I haven't seen this (on 2.6.24.7-92.fc8). The entry in /proc/scsi/scsi
disappears when the device is unplugged from the USB connector.  A
certain well-known direct vendor is notorious for USB ports that don't
behave.  On my system the manual says the USB ports are to be used
only for keyboard and mouse, so I added a couple PCI cards.

Do you see lines in /var/log/messages like:

May 17 14:41:50 cerberus kernel: usb 1-5: USB disconnect, address 4

You might be interested in <http://www.linux-usb.org/usbtest/>, which
recommends testing USB devices by randomly disconnecting/
connecting while tests are running.


-- 
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia



More information about the nSLUG mailing list