Unable to use external USB2 drive connected to the USB3 port

I have a white single bay 3TB My Cloud, everything is working fine except the inability to connect any of my two external USB2 harddrives.

My intention is to connect all three of my existing external USB drives to the USB port of the MyCloud and share them in my network along with the mycloud internal drive itself.

One of these drives is an USB3 drive and it works perfectly well, I can read and write it at around 70…80 MB/s from all my PCs, only slightly slower than the internal drive of the MyCloud itself. This is perfect.

Then I proceeded to connecting the other 2 drives (they are all externally powered). I tried all of the USB hubs I could find lying around here (3.0 and 2.0) and even tried connecting only one of the USB2 drives alone directly to the MyCloud without hub, it is always the same error symptom:

  • all drives mount immediately as it should be and shares are accessible
  • I can read from all drives, the USB2 drives give 28…30MB/s read throughput, this is also as expected, I can read hundreds of gigabytes from each drive for hours without any problem.
  • I can NOT write more than approximately one or two GB to any of the USB2 drives until they disconnect from USB and freeze completely. It is not sufficient to unplug the USB, the drive itself seems frozen I have to power cycle the drive (or its usb sata bridge) itself to make it detect the drive again, sometimes I even have to reboot the MyCloud completely to make it all work properly again after this happened.

The two drives have different USB-SATA bridges, one is from JMicron and the other one is from Fujitsu Siemens. Initially the drives were formatted FAT32 but later I reformatted them to ext4, makes absolutely no difference. The drives work perfectly well on both of my PCs, on my Laptop and on the USB plug of my wifi router and even on my old DVD player and just yesterday after reformatting one of them to ext4 I backuped, reformatted and restored 1TB of data from/to it while connected to my PC and it went at stable 32MB/s uninterrupted the entire night without the slightest hickup. The drives are both in perfect working order and have never caused any problems on any other host I have ever connected them to!

Only on the MyCloud there are problems and only when writing data to the drive. The first message in the dmesg is “USB device offlined”, then of course followed by hundreds of other messages about failed IO, the /dev/sdx block device disappears, the other drives on the same hub stay functional all the time, only the drive I have written to suddenly disconnects. The exact amount I have to write is not deterministic, sometimes it happens after less than 2GB written, sometimes a bit more but I have not yet managed to copy more than maybe 3 GB until it happens.

This is how it looks when it happens:

Plug in the drive:

[Tue Jan 30 22:14:10 2018] usb 1-1.3: new high-speed USB device number 43 using orion-ehci
[Tue Jan 30 22:14:10 2018] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[Tue Jan 30 22:14:10 2018] scsi12 : usb-storage 1-1.3:1.0
[Tue Jan 30 22:14:11 2018] scsi 12:0:0:0: Direct-Access     SAMSUNG  HD204UI               PQ: 0 ANSI: 2 CCS
[Tue Jan 30 22:14:11 2018] sd 12:0:0:0: [sdd] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
[Tue Jan 30 22:14:11 2018] sd 12:0:0:0: Attached scsi generic sg3 type 0
[Tue Jan 30 22:14:11 2018] sd 12:0:0:0: [sdd] Write Protect is off
[Tue Jan 30 22:14:11 2018] sd 12:0:0:0: [sdd] Mode Sense: 34 00 00 00
[Tue Jan 30 22:14:11 2018] sd 12:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[Tue Jan 30 22:14:11 2018]  sdd: sdd1
[Tue Jan 30 22:14:11 2018] sd 12:0:0:0: [sdd] Attached SCSI disk
[Tue Jan 30 22:14:11 2018] hotPlug.sh begin(seq=881)...
[Tue Jan 30 22:14:12 2018] hotPlug.sh end(seq=881).
[Tue Jan 30 22:14:23 2018] EXT4-fs (sdd1): recovery complete
[Tue Jan 30 22:14:23 2018] EXT4-fs (sdd1): mounted filesystem with ordered data mode. Opts: (null)

Ok, it’s properly mounted, share is visible. Now I begin writing a few GB to the drive.

3 minutes later:

First the transfer suddenly pauses, progress bar stops, drive LED stops blinking, total silence, still nothing in the dmesg, no error message yet.
Then maybe 20 seconds later suddenly an outbreak of activity in the dmesg:

[Tue Jan 30 22:17:23 2018] usb 1-1.3: reset high-speed USB device number 43 using orion-ehci
[Tue Jan 30 22:17:23 2018] usb 1-1.3: device descriptor read/64, error -32
[Tue Jan 30 22:17:23 2018] usb 1-1.3: device descriptor read/64, error -32
[Tue Jan 30 22:17:23 2018] usb 1-1.3: reset high-speed USB device number 43 using orion-ehci
[Tue Jan 30 22:17:23 2018] usb 1-1.3: device descriptor read/64, error -32
[Tue Jan 30 22:17:23 2018] usb 1-1.3: device descriptor read/64, error -32
[Tue Jan 30 22:17:24 2018] usb 1-1.3: reset high-speed USB device number 43 using orion-ehci
[Tue Jan 30 22:17:24 2018] usb 1-1.3: device descriptor read/8, error -71
[Tue Jan 30 22:17:24 2018] usb 1-1.3: device descriptor read/8, error -71
[Tue Jan 30 22:17:24 2018] usb 1-1.3: reset high-speed USB device number 43 using orion-ehci
[Tue Jan 30 22:17:24 2018] usb 1-1.3: device descriptor read/8, error -71
[Tue Jan 30 22:17:24 2018] usb 1-1.3: device descriptor read/8, error -71
[Tue Jan 30 22:17:24 2018] sd 12:0:0:0: Device offlined - not ready after error recovery
[Tue Jan 30 22:17:24 2018] usb 1-1.3: USB disconnect, device number 43
[Tue Jan 30 22:17:24 2018] sd 12:0:0:0: [sdd] Unhandled error code
[Tue Jan 30 22:17:24 2018] sd 12:0:0:0: [sdd]  
[Tue Jan 30 22:17:24 2018] Result: hostbyte=0x01 driverbyte=0x00
[Tue Jan 30 22:17:24 2018] sd 12:0:0:0: [sdd] CDB: 
[Tue Jan 30 22:17:24 2018] cdb[0]=0x2a: 2a 00 a4 01 b9 bf 00 00 f0 00
[Tue Jan 30 22:17:24 2018] end_request: I/O error, dev sdd, sector 2751576511
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947056
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947057
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947058
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947059
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947060
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947061
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947062
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947063
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947064
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947065
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947066
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947067
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947068
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947069
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947070
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947071
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947072
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947073
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947074
[Tue Jan 30 22:17:24 2018] Buffer I/O error on device sdd1, logical block 343947075

[...]

thousands of I/O errors more

I also noticed that this happens with all three of my external HDs, not only the USB2 ones. The USB3 disk will also pause every few minutes and exactly one “reset high-speed USB device number xx” message will appear in the dmesg, the difference is it seems to recover from this and continue after 20 seconds pause, this is why I did not notice it earlier and thought it was an USB2 only problem.

So whatever it is that is causing the USB stack to reset the devices during heavy traffic will happen on all my external disks, regardless of manufacturer or USB version, and it is just pure chance that one of my 3 drives will recover from this error while the other ones don’t.

Again: This happens with or without USB hub and at this point for me it is beyond any doubt that my external drives are not faulty (one of them is brand new) and all these drives work on all my PCs without any problem, transferring terabytes of data in both directions the entire night without a single hickup in the dmesg on both of my desktop PCs and also work on all other devices I have ever connected them to.

1.) Has anybody else ever connected an USB drive to a MyCloud and actually used it?
2.) Is it possible that my unit has a hardware problem?
3.) is it possible that this is a driver problem, are there known USB driver problems in this ancient kernel version that is used in the MyCloud?
3.a) if so: why does WD ship their product with an ancient 5 year old kernel?

The cdb[0]=0x2a: 2a 00 a4 01 b9 bf 00 00 f0 00
Shows that it is a write command (0x2a) to logical block 2751576511(a4 01 b9 bf)
Somewhere in the dmesg should be sense data. The sense data will tell you what the error was

isn’t the subsequent error of the failing write command already meaningless when the lower layer of USB transport has already failed and is already disconnected at that time? I mean if USB was already disconnected earlier the sense data would not have come through anyway, would it?

Then you need the first set of error messages.

I’m going to try to catch the entire dmesg if I have some time tonight, but the log above shows the very beginning of the error, the first thing hat happens is always the “reset high-speed USB device”, it seems to do this after some kind of timeout.

First the transfer suddenly pauses for no apparent reason, no error yet, then after maybe 20 seconds the “reset high-speed USB device” is happening and then two of my drives give the additional “device descriptor read” errors (USB probably already dead at this time and reset did not work because device descriptor read is always among the first things that happens in an USB handshake during USB connect) and only one of my 3 devices (the USB3 one) apparently will continue working after the USB reset, with the other two devices the USB reset seems to fail and the device controller has been messed up so hard that it even needs a power cycle to work again.

I very much suspect an USB problem. It should not need to trigger USB resets every few minutes at all!

Does the usb host controller driver maybe have some options where I can enable additional debug output or change some other options to see if the symptoms change and gain more insights?

on the other hand… Why should I put more time and energy into doing WD’s homework for them and fix their bugs. After all I paid money for this thing.

I think I’m going to return it and buy a Synology.

Or even better I buy a small mainboard and a power supply and build my own NAS, this way I can at least run an up to date kernel and software stack with a proper init system that is not put together by bloody amateurs and for which I can get updates in a timely manner and also don’t need crazy hacks just to run my own init scripts (whose only purpose would be to patch the broken mess they call firmware on every boot).

Yes. RPi or BananaPi, add HDD and NAS s/w. Plenty of guides for doing this sort of thing.

More like Rock64 or Odroid-XU4 or Espressobin because USB3. I’m mainly copying large files to or from the NAS, only one at a time, I only care about linear read or write speed, so if all disks were attached with a single USB3 this would already be ok for me.

So essentially the device I am really looking for resembles some kind of SMB/Ethernet <-> USB bridge. Some kind of diskless USB3 NAS device. I was hoping the MyCloud would be a cheap way to have such a device (plus additional 3TB built in as a bonus) but without actually properly working USB this is quite useless.