• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: USB Drive Disconnect. HELPPP ME !!!!!  (Read 3684 times)
hallmont360
Newbie
*

Karma: 0
Posts: 3


View Profile
« on: March 20, 2010, 08:08:46 AM »


I have a WD 2.5 Passpord Drive that seems to disconnect after 2 days of use.  Initially it's mounted on /dev/sda1, but later it reconnects as /dev/sdb1.  I can fix this by unplugging it drive and plugging it back in, but this is extremely annoying and limits its use as a NAS.  Am I the only one having this problem HuhHuhHuh?

root@debian:/var/log# fdisk -l

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8f9c798a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       38913   312568641    c  W95 FAT32 (LBA)


Here's the log from /var/log/messages ....


Mar 19 19:48:32 debian kernel: sd 8:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
Mar 19 19:48:32 debian kernel: end_request: I/O error, dev sda, sector 494000891
Mar 19 19:48:32 debian kernel: lost page write due to I/O error on sda1
Mar 19 19:48:32 debian kernel: usb 1-1.6: USB disconnect, address 11
Mar 19 19:48:38 debian kernel: usb 1-1.6: new high speed USB device using ehci_marvell and address 12
Mar 19 19:48:38 debian kernel: usb 1-1.6: configuration #1 chosen from 1 choice
Mar 19 19:48:38 debian kernel: scsi9 : SCSI emulation for USB Mass Storage devices
Mar 19 19:48:43 debian kernel: scsi 9:0:0:0: Direct-Access     WD       3200BEV External 1.05 PQ: 0 ANSI: 4
Mar 19 19:48:43 debian kernel: sd 9:0:0:0: [sdb] 625142448 512-byte hardware sectors (320073 MB)
Mar 19 19:48:43 debian kernel: sd 9:0:0:0: [sdb] Write Protect is off
Mar 19 19:48:43 debian kernel: sd 9:0:0:0: [sdb] 625142448 512-byte hardware sectors (320073 MB)
Mar 19 19:48:43 debian kernel: sd 9:0:0:0: [sdb] Write Protect is off
Mar 19 19:48:43 debian kernel:  sdb: sdb1
Mar 19 19:48:43 debian kernel: sd 9:0:0:0: [sdb] Attached SCSI disk
Mar 19 19:48:43 debian kernel: sd 9:0:0:0: Attached scsi generic sg0 type 0
Logged

cjm
Jr. Member
**

Karma: 6
Posts: 69


View Profile
« Reply #1 on: March 20, 2010, 05:40:22 PM »

Are you connecting the disk via a USB hug?

I had a similar problem with a NSLU2 when I used a USB hub to connect a serial dongle for my UPS. It seems as if some hubs cause a disconnect after some time and when the USB stack reconnects the hub, all devices have to be reconnected as well. Since the UPS monitoring software still had the port open, the dongle got connected to ttyUSB1 instead of ttyUSB0.

I expected similar trouble when I got my Sheevaplug but I'm using a different hub now from Logitech and this doesn't show any such problems.

Before getting another hub, you might want to try to disable USB autosuspend which is known to cause issues in certain cases, e.g. in rc.local:


find /sys -path "*usb*" -name autosuspend | while read f; do
  echo -1 >$f
done

Logged

hallmont360
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #2 on: March 21, 2010, 09:21:49 AM »

Thanks for the response.  You're correct.  I'm currently using a D-Link 7 port USB 2.0 hub.  I did try to run the script to disable autosuspend, but it looks like there's no existing files call autosuspend under the /sys directories or subdirectories.  However, I'm pretty sure I had the same problem even without the hub.  I'm going to switch back to not using the hub to see if my memory is correct.  Thanks.
Logged

cjm
Jr. Member
**

Karma: 6
Posts: 69


View Profile
« Reply #3 on: March 21, 2010, 01:43:37 PM »

When you connect the drive directly to the Sheevaplug, make sure you connect the drive to external power if possible because the plug's power supply doesn't seem to cope well with the additional load of a hard disk and tends to overload its capacitors, causing power supply failures.

It's weird that you don't get any autosuspend files in /sys. This is what it looks like on my plug:


$ lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=orion-ehci/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/4p, 480M
        |__ Port 2: Dev 3, If 0, Class=vend., Driver=pl2303, 12M
        |__ Port 3: Dev 4, If 0, Class=stor., Driver=usb-storage, 480M

$ find /sys -path "*usb*" -name autosuspend
/sys/devices/platform/orion-ehci.0/usb1/power/autosuspend
/sys/devices/platform/orion-ehci.0/usb1/1-1/power/autosuspend
/sys/devices/platform/orion-ehci.0/usb1/1-1/1-1.2/power/autosuspend
/sys/devices/platform/orion-ehci.0/usb1/1-1/1-1.3/power/autosuspend
/sys/module/usbcore/parameters/autosuspend


BTW, I'm using a Logitech hub (as mentioned above) but after a quick check on their site it seems they no longer manufacture hubs. The chipset inside the Logitech hub is from NEC, USB ID 0409:005a. This hub works perfectly fine for both the hard disk and the serial dongle, no disconnects or any other kind of problem. Quite in contrast to the cheap hub I had before which disconnected every few days.... Unfortunately I ditched it so I can't tell what it was. The only thing I remember is that it was from Hama.

I actually got an eSATA plug from NewIT because I expected tons of problems with USB hubs and wanted to get rid of USB for disk drives but my external HD enclosure has another crap chip on it which doesn't work with the Marvell SATA controller. Running out of time, I tested the USB connection and it worked so well that I'm not putting much effort into getting the eSATA connection working right now...
« Last Edit: March 21, 2010, 01:50:52 PM by cjm » Logged

rooster
Administrator
Sr. Member
*****

Karma: 8
Posts: 311


View Profile
« Reply #4 on: March 21, 2010, 09:37:34 PM »

what kernel do you use?
I think that the support was added around 2.6.23 and Marvell LSP is based on 2.6.22.
If you are using older kernel than 2.6.23, check that the kernel was built with the support in the CONFIG file.
Logged

hallmont360
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #5 on: March 23, 2010, 12:40:49 AM »


Ok, yup.  It doesn't work either if I connect the drive directly (without a hub).  After a day, it failed again and switched from /dev/sda1 over to /dev/sdb1.  The drive is a 2.5 WD passport drive, so it doesn't take any external power source.

Here's the log ...

Mar 23 00:11:31 debian kernel: 1770699) failed
Mar 23 00:11:36 debian kernel: usb 1-1: new high speed USB device using ehci_marvell and address 5
Mar 23 00:11:36 debian kernel: usb 1-1: configuration #1 chosen from 1 choice
Mar 23 00:11:36 debian kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Mar 23 00:11:41 debian kernel: scsi 2:0:0:0: Direct-Access     WD       3200BEV External 1.05 PQ: 0 ANSI: 4
Mar 23 00:11:41 debian kernel: sd 2:0:0:0: [sdb] 625142448 512-byte hardware sectors (320073 MB)
Mar 23 00:11:41 debian kernel: sd 2:0:0:0: [sdb] Write Protect is off
Mar 23 00:11:41 debian kernel: sd 2:0:0:0: [sdb] 625142448 512-byte hardware sectors (320073 MB)
Mar 23 00:11:41 debian kernel: sd 2:0:0:0: [sdb] Write Protect is off
Mar 23 00:11:41 debian kernel:  sdb: sdb1
Mar 23 00:11:41 debian kernel: sd 2:0:0:0: [sdb] Attached SCSI disk
Mar 23 00:11:41 debian kernel: sd 2:0:0:0: Attached scsi generic sg0 type 0

I'm running with 2.6.22.  Maybe I'll try to upgrade my kernel ...

$ uname -a
Linux debian 2.6.22.18 #1 Thu Mar 19 14:46:22 IST 2009 armv5tejl GNU/Linux

$ lsusb -t
Bus#  1
`-Dev#   1 Vendor 0x0000 Product 0x0000

This is the most straighforward setup I can think of.  I'm a bit disappointed that it doesn't work out of the box.
Logged

thrbigob
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #6 on: March 23, 2010, 12:47:08 AM »

I have a WD passport working on mine:

Code:
callum@SheevaPlug:~$ uname -a
Linux SheevaPlug 2.6.30.2 #11 PREEMPT Wed Jul 22 19:53:31 MDT 2009 armv5tel GNU/Linux

I use autofs to manage this though as I spin down and unmount when not in use.

tail of var log
Code:
Mar 23 07:43:50 SheevaPlug logger: Powering up WD Passport storage...
Mar 23 07:43:50 SheevaPlug logger: Spinning up WD Passport...
Mar 23 07:43:50 SheevaPlug logger: Mounting WD Passport...
Mar 23 07:43:55 SheevaPlug kernel: kjournald starting.  Commit interval 600 seconds
Mar 23 07:43:55 SheevaPlug kernel: EXT3 FS on sda1, internal journal
Mar 23 07:43:55 SheevaPlug kernel: EXT3-fs: mounted filesystem with ordered data mode.

Logged

cjm
Jr. Member
**

Karma: 6
Posts: 69


View Profile
« Reply #7 on: March 25, 2010, 12:29:43 PM »

Hmm... USB in Linux is not really perfect yet, mainly because USB gadgets are mostly tested with Windows and don't always follow the standards, especially when comes to powersaving features. I just replaced a PS2 connector for my laptop running Debian Lenny because it tended to freeze for a few seconds every few minutes...

You might want to try a later kernel version, though. I'm using 2.6.32 on the plug...
Logged

Pages: [1]
Print
Jump to: