On Mon, 26 Jun 2006, t35t0r wrote:

> Cycling the power always works, but since I'm in another building or
> miles away from the computer and drive at times it's not an option.

That _is_ a problem...

> >         rmmod usb-storage ; modprobe usb-storage
> >
> > If you have more than one USB mass-storage device, this will reset all of
> > them.  There are ways to do the same thing to just a single device, but
> > there's no guarantee that it will work.
> 
> What's the similar method for trying that on only a single device? I
> have another 250gb lacie drive which I cannot "cycle" at the moment
> since an application is writing data to it.

To do this for a single device you need to know the sysfs "name" for that 
device.  There are a couple of ways to find it; here's one of them.

I just inserted a USB flash drive in my computer; it is /dev/sda.  So I 
would do:

# ls -l /sys/block/sda/device
lrwxrwxrwx  1 root root 0 Jun 26 17:00 /sys/block/sda/device -> 
../../devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4:1.0/host0/target0:0:0/0:0:0:0/

The important part here is the section just preceding the "/host".  In 
other words, my flash drive's sysfs name is "1-4:1.0".  This name is not 
likely to change over time; it depends mostly on which USB port the drive 
is plugged into.

The next step is:

# cd /sys/bus/usb/drivers/usb-storage
# ls
1-4:1.0  bind  module  new_id  unbind

If I had more USB mass-storage devices plugged in, each of their names 
would show up in the file listing.

The equivalent of "rmmod usb-storage" for the single device is then:

# echo -n 1-4:1.0 >unbind

and the equivalent of "modprobe usb-storage" for that device is:

# echo -n 1-4:1.0 >bind

This last step should produce some output in the dmesg log.

Alan Stern


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to