Linux – USB drive keeps disconnecting and reconnecting

external hard drivelinuxusb

I'm running Debian 7.2 on an old late 2006 Macbook Pro. I've got two 4 TB Seagate Backup Plus hard drives connected to it that I've got in a mirrored ZFS pool. Recently one of the drives died, and I received a replacement drive that I'm trying to add as a new mirror. However, I can't get it to resilver, as an error inevitably happens before it can finish.

The problem is that this replacement drive seemingly keeps disconnecting and reconnecting within a fraction of a second. What I've found is the following messages being printed in the system log over and over:

Jan 19 20:08:07 thingamadealies kernel: [100555.410370] usb 1-1: USB disconnect, device number 43
Jan 19 20:08:07 thingamadealies kernel: [100555.660059] usb 1-1: new high-speed USB device number 44 using ehci_hcd
Jan 19 20:08:07 thingamadealies kernel: [100555.794444] usb 1-1: New USB device found, idVendor=0bc2, idProduct=a0a4
Jan 19 20:08:07 thingamadealies kernel: [100555.794452] usb 1-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Jan 19 20:08:07 thingamadealies kernel: [100555.794458] usb 1-1: Product: Backup+ Desk Mac
Jan 19 20:08:07 thingamadealies kernel: [100555.794463] usb 1-1: Manufacturer: Seagate
Jan 19 20:08:07 thingamadealies kernel: [100555.794467] usb 1-1: SerialNumber: XXXXXXXX
Jan 19 20:08:07 thingamadealies kernel: [100555.795636] scsi41 : usb-storage 1-1:1.0
Jan 19 20:08:07 thingamadealies mtp-probe: checking bus 1, device 44: "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1"
Jan 19 20:10:46 thingamadealies kernel: [100714.601169] usb 1-1: USB disconnect, device number 44
Jan 19 20:10:46 thingamadealies kernel: [100714.872081] usb 1-1: new high-speed USB device number 45 using ehci_hcd
... etc ...

Sometimes this will happen several times a minute. Occasionally the messages get printed with a few seconds of each other. On other occasions this behavior stops altogether for several hours, or even close to a day. I sort of suspect, but have no proof, that it might be related to when the hard drive is under load.

No other USB or IO errors or other relevant messages are printed to syslog, and I don't know where else I can look for clues.

The other drive doesn't have this problem at all, and has been working great since I got it.

What I've tried so far:

  • switching which USB plugs the drives are connected, to see if the other drive starts having this problem. So far it hasn't but it's only been an hour or two.
  • I've also googled quite a bit, and found other people with similar problems, but none exactly like mine, and I haven't found a solution yet. Most people with this issue at least get some kind of USB error in syslog along with the "USB disconnect" message.

Any help anyone could give me would be much appreciated! I don't really know how to debug a hardware issue like this.

Update:

After switching which USB plugs the drives are connected to, the message being outputting to syslog changed to:

usb 1-3: reset high-speed USB device number 4 using ehci_hcd

I've confirmed usb 1-3 is the problem drive. So something is still wrong, but it's a slightly different wrong thing now. So far ZFS hasn't had any errors… hopefully it'll stay that way.

Update 2:

The resilvering has finished! However, I'm still getting the "reset high-speed USB device" messages. I tried switching around the cables between my two drives, but it didn't make any difference, so I think that rules out the issue being the cable.

I've seen some evidence that upgrading my kernel might fix this, so I'm going to give that a shot.

Update 3:

Upgraded my kernel to 3.10, had no effect. Still don't know how to fix this.

Best Answer

It's over two years later but I figured I may as well answer this question just in case anyone else ever has the same issue.

It turns out that one of the USB2 ports on this old MacBook Pro was not working properly. Not sure exactly what the issue was, but I ended up buying a USB3 expansion card to get better speed out of the drives, and after using that both drives performed perfectly. This is the first and only time I've ever had a USB port actually be the cause of a problem like this.

Related Question