LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-11-2006, 07:53 PM   #1
wootletootle
Member
 
Registered: Jul 2002
Location: New Zealand
Distribution: slackware
Posts: 81

Rep: Reputation: 15
USB data stick problem


Hello, I have a problem maintaining contact with
my Kingston Data Traveller. It can be mounted
but after a time it disappears
from sight and can't be remounted

> mount /dev/sda <mountpoint>
mount: /dev/sda is not a valid block device

dmesg shows errors like below:

......................................................
hub 2-0:1.0: port 2 disabled by hub (EMI?), re-enabling...
usb 2-2: USB disconnect, address 2
usb-storage: storage_disconnect() called
usb-storage: usb_stor_stop_transport called
usb-storage: -- usb_stor_release_resources
usb-storage: -- sending exit command to thread
usb-storage: -- dissociate_dev
usb-storage: *** thread awakened.
usb-storage: -- exiting
usb 2-2: new full speed USB device using ohci_hcd and address 3
usb 2-2: device descriptor read/64, error -110
usb 2-2: device descriptor read/64, error -110
usb 2-2: new full speed USB device using ohci_hcd and address 4
usb 2-2: device descriptor read/64, error -110
usb 2-2: device descriptor read/64, error -110
usb 2-2: new full speed USB device using ohci_hcd and address 5
usb 2-2: device not accepting address 5, error -110
usb 2-2: new full speed USB device using ohci_hcd and address 6
usb 2-2: device not accepting address 6, error -110
scsi2 (0:0): rejecting I/O to dead device
FAT: Directory bread(block 480) failed
scsi2 (0:0): rejecting I/O to dead device
FAT: Directory bread(block 481) failed
..........................................................

The datastick is registered at bootup (see below)
and can be detected in /proc/bus/usb and
/proc/scsi/usb_storage. After it disconnects
the usb_storage directory disappears.

Does anybody have any suggestions?

What does the "hub" error mean?
If I can't stop disconnection how can
I reconnect (without rebooting)?
Why does /dev/sda stop being recognized
as a block device?

Thanks,
Roger.

The USB drivers are compiled into the kernel.
I have

scsi: SCSI_PROC_FS, CHR_DEV_SG, BLK_DEV_SD
usb: USB_DEVICEFS, USB_OHCI_HCD, USB_STORAGE


Boot messages showing that the datastick is detected:
............................................................
ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ACPI: PCI Interrupt 0000:02:07.0[A] -> GSI 19 (level, low) -> IRQ 16
ohci_hcd 0000:02:07.0: OPTi Inc. 82C861
ohci_hcd 0000:02:07.0: new USB bus registered, assigned bus number 1
ohci_hcd 0000:02:07.0: irq 16, io mem 0xf1001000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:02:07.1[B] -> GSI 16 (level, low) -> IRQ 17
ohci_hcd 0000:02:07.1: OPTi Inc. 82C861 (#2)
ohci_hcd 0000:02:07.1: new USB bus registered, assigned bus number 2
ohci_hcd 0000:02:07.1: irq 17, io mem 0xf1002000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usb 2-2: new full speed USB device using ohci_hcd and address 2
usb-storage: USB Mass Storage device detected
usb-storage: -- associate_dev
usb-storage: Vendor: 0x0951, Product: 0x1603, Revision: 0x0200
usb-storage: Interface Subclass: 0x06, Protocol: 0x50
usb-storage: Transport: Bulk
usb-storage: Protocol: Transparent SCSI
usb-storage: usb_stor_control_msg: rq=fe rqtype=a1 value=0000 index=00 len=1
usb-storage: GetMaxLUN command result is 1, data is 0
usb-storage: *** thread sleeping.
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
.............................................................
 
Old 11-11-2006, 09:36 PM   #2
pnellesen
Member
 
Registered: Oct 2004
Location: Missouri, USA
Distribution: Slackware 12.2, Xubuntu 9.10
Posts: 371

Rep: Reputation: 31
I feel your pain The quick answer is that the device your data stick is being assigned to is changing. I don't know the technical reason why, but what happens is that one time it may be assigned to "/dev/sda1" (usually it will be assigned as the first partition on device sda, hence the "1"), the next time maybe /dev/sdb1, and so on (c, d, e, etc...) I don't see what kernel you're using, but if you have a 2.6 kernel you can use "udev" to set up mounting rules based upon certain properties of the usb stick itself (such as model number, manufacturer, etc.) If not, then one (ugly) trick I would do was to create a bunch of mount directories in /mnt, then edit fstab to point each /dev/sd<x>1 device to a particular mount point. Ugly, but it worked ok...

Hope this helps a little bit.
 
Old 11-11-2006, 10:44 PM   #3
uglydot
Member
 
Registered: Mar 2003
Distribution: Gentoo
Posts: 232

Rep: Reputation: 30
Do this...

http://devpit.org/wiki/Usbkey_udev_and_autofs_rules
 
Old 11-12-2006, 12:51 AM   #4
wootletootle
Member
 
Registered: Jul 2002
Location: New Zealand
Distribution: slackware
Posts: 81

Original Poster
Rep: Reputation: 15
Many thanks for your help pnellesen & uglydot,
you have fixed the problem

I followed the link given by uglydot
As a Slackware user I had to make 1 or 2
adjustments. The alterations are

(2) groupadd usbkey
usermod -G usbkey <login>

(4) udevtest /sys/block/sda block

After (6) one can run

(6a) mount /dev/sda <mountpoint>

Thanks again!
 
Old 11-12-2006, 02:05 AM   #5
uglydot
Member
 
Registered: Mar 2003
Distribution: Gentoo
Posts: 232

Rep: Reputation: 30
Glad it helped, I had to run to work or I would have been more helpful. Looks like you knew what you were doing fine with our little points in the right direction though. =D
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem installing USB Data Stick djsunny Linux - Hardware 8 04-10-2006 07:42 AM
[FC4] USB Stick unmounts itself every 30 seconds, cannot put data onit polemon Linux - Newbie 2 07-24-2005 11:34 PM
mount/umount usb stick - PQI Intelligent Stick 2.0 sandbag Linux - Software 5 05-06-2005 11:12 AM
USB Stick Problem ZooL Linux - Hardware 5 01-25-2005 04:53 AM
copying/moving stalls when moving a lot of data to a usb stick =X= Linux - Hardware 10 07-30-2004 05:29 AM


All times are GMT -5. The time now is 04:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration