RandyOo
Posts: 18
Joined: Sat Mar 12, 2016 8:16 am

USB 3.0 hubs unreliable on Pi4

Mon Dec 02, 2019 12:56 am

I've had a pretty frustrating experience thus far, in my attempts to set up a reliable Network Attached Storage server on my new Pi4. I've connected two self-powered 12TB WD Easystore external HDDs via a USB 3.0 hub, and have been plagued with intermittent USB disconnects/resets, causing data corruption. I've tested with 3 different hubs, and only one of them has been reliable.

The errors manifest in dmesg:

Code: Select all

Nov 30 00:22:12 rpi4 kernel: [214989.685792] usb 2-1.1.2: reset SuperSpeed Gen 1 USB device number 11 using xhci_hcd
Nov 30 00:22:12 rpi4 kernel: [214989.709485] sd 2:0:0:0: [sdc] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Nov 30 00:22:12 rpi4 kernel: [214989.709496] sd 2:0:0:0: [sdc] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 40 dc b8 30 00 00 08 00 00 00
Nov 30 00:22:12 rpi4 kernel: [214989.709516] zio pool=pool vdev=/dev/sdc1 error=5 type=1 offset=557160882176 size=1048576 flags=40080cb0
Nov 30 07:41:13 rpi4 kernel: [241330.541219] usb 2-1.1.1: USB disconnect, device number 10
Nov 30 07:41:13 rpi4 kernel: [241330.541721] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
Nov 30 07:41:13 rpi4 kernel: [241330.541729] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 04 12 f8 11 18 00 00 08 00 00 00
Nov 30 07:41:13 rpi4 kernel: [241330.541746] zio pool=pool vdev=/dev/sdb1 error=5 type=1 offset=8959034535936 size=1048576 flags=40080cb0
*snip*
Nov 30 07:41:13 rpi4 kernel: [241330.542174] zio pool=pool vdev=/dev/sdb1 error=5 type=1 offset=8959040827392 size=1048576 flags=40080cb0
Nov 30 07:41:16 rpi4 kernel: [241333.757171] usb 2-1.1.1: new SuperSpeed Gen 1 USB device number 12 using xhci_hcd
A zpool scrub comes up with both read and checksum errors.

I should probably point out that it's running the 64-bit kernel:

Code: Select all

[email protected]:/home/pi# uname -a
Linux rpi4 4.19.83-v8+ #1277 SMP PREEMPT Mon Nov 11 16:53:30 GMT 2019 aarch64 GNU/Linux
Thus far, I've tried out 3 different hubs:
  • Anker A7516 (unpowered) Bus 002 ID 0bda:0411/Bus 001 ID 0bda:5411 Realtek Semiconductor Corp.
    error-free for about 36 hours/4TB transferred, then errors as above
  • atolla 207 (powered) Bus 002 Device 008: ID 045b:0210/Bus 001 ID 045b:0209 Hitachi, Ltd
    error-free for only 3 hours, then errors as above
  • Anker (unpowered) with Via Labs VL812 chipset Bus 002 ID 2109:0812/Bus 001 ID 2109:2812 VIA Labs, Inc. VL812 Hub
    error-free for >7 days thus far, >30TB transferred
Since the reliable one isn't a powered hub, and one of the unreliable ones is, it seems pretty clear that power isn't the underlying issue. I did read this sticky, but the symptoms and error messages don't line up at all, so I doubt UAS is the cause, but I haven't yet enabled the "usb-storage.quirks" option to verify.

I'm mainly sharing this information in the hopes that it will help others, either in finding themselves a usable USB hub, or in resolving whatever the underlying issue is. Now that I've found what appears to be a reliable hub, I'll likely purchase a powered hub that shares the same VL812 chipset.

I'd be interested in learning others' experiences with USB hubs. I did find this page, but it doesn't seem to be updated for the Pi4/USB 3.0.

andrum99
Posts: 922
Joined: Fri Jul 20, 2012 2:41 pm

Re: USB 3.0 hubs unreliable on Pi4

Mon Dec 02, 2019 9:45 pm

I've also seen occasional problems when using ZFS on a Dlink DUB-1340 power USB 3.0 hub - vid:pid is 05e3:0617

ZFS copes fine with the UAS errors I'm seeing - there is just a delay shown in 'zpool events'. In my case the errors are UAS errors, not USB.

RandyOo
Posts: 18
Joined: Sat Mar 12, 2016 8:16 am

Re: USB 3.0 hubs unreliable on Pi4

Tue Dec 03, 2019 11:21 pm

A quick update: I've pumped another 30TB of data through the USB port using the USB hub with the VL812 chipset, with no issues. Powered hubs based on the VL812 seem pretty spendy, but I found an affordable hub that has the option of being powered through a micro USB port and is based on the VL817, which appears to be the current replacement for the VL812. It just arrived, so I'll test it out for a few days and see what happens. VID/PID is 2109:0817.

andersdk
Posts: 28
Joined: Sun Feb 03, 2019 8:29 pm

Re: USB 3.0 hubs unreliable on Pi4

Tue Dec 03, 2019 11:28 pm

It should be possible to power any USB hub via a USB male A to male A from a standard USB supply.
These cables are available from AliExpress, Ebay etc.
This will of course take up that one hub port used only for power connection.

If you are handy with a soldering iron, you can always open the hub and solder in an extra cable used only for USB power.

RandyOo
Posts: 18
Joined: Sat Mar 12, 2016 8:16 am

Re: USB 3.0 hubs unreliable on Pi4

Tue Dec 03, 2019 11:40 pm

andersdk wrote:
Tue Dec 03, 2019 11:28 pm
It should be possible to power any USB hub via a USB male A to male A from a standard USB supply.
These cables are available from AliExpress, Ebay etc.
This will of course take up that one hub port used only for power connection.

If you are handy with a soldering iron, you can always open the hub and solder in an extra cable used only for USB power.
Yep! A gender-changing adapter would be another option. But it's my understanding that backfeeding the host port can be problematic, and so I was glad to see a reviewer had already tested and confirmed that isn't an issue with this particular model. I'll be very glad if this device proves to work as reliably as the VL812-based hub did.

andersdk
Posts: 28
Joined: Sun Feb 03, 2019 8:29 pm

Re: USB 3.0 hubs unreliable on Pi4

Wed Dec 04, 2019 12:15 am

I do not (yet) have a Pi4.
On my Pi's (zero, 1B, 1B+ ,2B, 3B) its not a problem backfeeding power via the USB to my experience
Provided your PSU this way in has enough umph, you can run the Pi off this power.

Its best to use the dedicated OTG power port to avoid any sudden power loss if you need to alter the USB connections

Return to “Troubleshooting”