Odroid XU4 USB 3.0 – Fixing HDD Dies After 10 Minutes Issue

debianhard-disklinuxusb

I recently connected a 3 TB hard drive to my Odroid XU4 over a USB 3.0 docking station. It was detected correctly and I mounted it.

But after writing about 10 GB of data I got lots of errors. My /var/log/syslog looked like this:

odroid kernel: [410867.640870] usb 4-1.2: new SuperSpeed USB device number 3 using xhci-hcd
odroid kernel: [410867.662186] usb 4-1.2: New USB device found, idVendor=067b, idProduct=2773
odroid kernel: [410867.662217] usb 4-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
odroid kernel: [410867.662240] usb 4-1.2: Product: Quickport Combo U3
odroid kernel: [410867.662262] usb 4-1.2: Manufacturer: SHARKOON
odroid kernel: [410867.662283] usb 4-1.2: SerialNumber: SHARK000000002
odroid kernel: [410867.666319] usb-storage 4-1.2:1.0: USB Mass Storage device detected
odroid kernel: [410867.672956] scsi host0: usb-storage 4-1.2:1.0
odroid mtp-probe: checking bus 4, device 3: "/sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2"
odroid mtp-probe: bus: 4, device: 3 was not an MTP device
odroid kernel: [410867.773185] usbcore: registered new interface driver uas
odroid kernel: [410868.753587] scsi 0:0:0:0: Direct-Access     ST3000DM 001-1CH166       CC29 PQ: 0 ANSI: 0
odroid kernel: [410868.758912] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
odroid kernel: [410868.759096] sd 0:0:0:0: Attached scsi generic sg0 type 0
odroid kernel: [410868.760501] sd 0:0:0:0: [sda] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
odroid kernel: [410868.761937] sd 0:0:0:0: [sda] Write Protect is off
odroid kernel: [410868.762049] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
odroid kernel: [410868.763561] sd 0:0:0:0: [sda] No Caching mode page found
odroid kernel: [410868.767656] sd 0:0:0:0: [sda] Assuming drive cache: write through
odroid kernel: [410868.777812] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
odroid kernel: [410868.847735]  sda: sda1 sda2 sda3
odroid kernel: [410868.861331] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
odroid kernel: [410868.865234] sd 0:0:0:0: [sda] Attached SCSI disk
odroid systemd[1]: dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device: Dev dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device appeared twice with different sysfs paths /sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda3 and /sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda2
odroid systemd[944]: dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device: Dev dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device appeared twice with different sysfs paths /sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda3 and /sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda2
odroid systemd[20118]: dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device: Dev dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device appeared twice with different sysfs paths /sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda2 and /sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda3
odroid kernel: [411003.006383] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
odroid systemd[20118]: dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device: Dev dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device appeared twice with different sysfs paths /sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda2 and /sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda3
odroid kernel: [411443.428924] usb 4-1.2: reset SuperSpeed USB device number 3 using xhci-hcd
odroid kernel: [411443.449604] usb 4-1.2: device firmware changed
odroid kernel: [411444.469255] usb 4-1-port2: cannot disable (err = -110)
odroid kernel: [411444.569096] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
odroid kernel: [411444.569151] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 01 c4 13 00 00 00 01 00 00 00
odroid kernel: [411444.569188] blk_update_request: I/O error, dev sda, sector 29627136
odroid kernel: [411444.673957] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
odroid kernel: [411444.673993] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 b0 13 88 00 00 00 00 08 00 00
odroid kernel: [411444.674017] blk_update_request: I/O error, dev sda, sector 2954070016
odroid kernel: [411444.679304] EXT4-fs error (device sda3): ext4_wait_block_bitmap:503: comm kworker/u16:0: Cannot read block bitmap - block_group = 96, block_bitmap = 3145728
odroid kernel: [411444.770110] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
odroid kernel: [411444.770145] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x8a 8a 00 00 00 00 00 b0 13 48 00 00 00 08 00 00 00
odroid kernel: [411444.770169] blk_update_request: I/O error, dev sda, sector 2954053632
odroid kernel: [411444.775389] EXT4-fs warning (device sda3): ext4_end_bio:314: I/O error -5 writing to inode 122 (offset 0 size 8388608 starting block 369256960)
odroid kernel: [411444.775430] Buffer I/O error on device sda3, logical block 3143680
odroid kernel: [411444.781543] Buffer I/O error on device sda3, logical block 3143681
odroid kernel: [411444.787798] Buffer I/O error on device sda3, logical block 3143682
odroid kernel: [411444.794033] Buffer I/O error on device sda3, logical block 3143683
odroid kernel: [411444.800266] Buffer I/O error on device sda3, logical block 3143684
odroid kernel: [411444.806506] Buffer I/O error on device sda3, logical block 3143685
odroid kernel: [411444.812743] Buffer I/O error on device sda3, logical block 3143686
odroid kernel: [411444.818985] Buffer I/O error on device sda3, logical block 3143687
odroid kernel: [411444.825237] Buffer I/O error on device sda3, logical block 3143688
odroid kernel: [411444.831461] Buffer I/O error on device sda3, logical block 3143689
odroid kernel: [411444.928916] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
odroid kernel: [411444.928946] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x8a 8a 00 00 00 00 00 ae 93 88 00 00 00 00 08 00 00
odroid kernel: [411444.928965] blk_update_request: I/O error, dev sda, sector 2928904192
odroid kernel: [411444.934145] Buffer I/O error on dev sda3, logical block 0, lost sync page write
odroid kernel: [411444.941579] EXT4-fs (sda3): Delayed block allocation failed for inode 122 at logical offset 2048 with max blocks 2048 with error 5
odroid kernel: [411444.953239] EXT4-fs (sda3): This should not happen!! Data will be lost

It gets unmounted and I am unable to mount it again. I have to disconnect the USB cable and connect it again.

So I checked S.M.A.R.T … no errors found. It turns out to work fine with USB 2.0. Copying data for hours now without errors.
I tried a different HDD over USB 3.0 and got similiar results. After some writing it gets disconnected.

Any ideas?

Best Answer

It's probably related to UAS (USB Attached SCSI) mode. It is available officially only starting from USB 3.0, so this would explain why USB 2.0 works fine (UAS is not selected).

The problem is usually related to perhaps badly implemented firmwares on the adapter, or anyway an interoperability problem in the communication with Linux drivers. Commercial drivers made by the hardware/firmware vendor might have special handling of these bugs because they are known to the vendor.

If there's no way to correct the problem, sometimes it's possible to work around it by disabling some features. On Linux there are at least 5 Usb Storage quirks flags to disable UAS features (f,g,j,t,u) manually. When models are clearly identified as badly behaving, they are added to an internal blacklist to apply those quirks automatically. Manually you have to add a boot option or an usb-storage module option.

So first try disabling UAS entirely with quirk u, see if that solves the problem. See later if for example using the t or g option instead of u might be enough.

kernel cmdline boot option (using the VID:PID seen in your logs):

usb-storage.quirks=067b:2773:u

module option (create a file in /etc/modprobe.d):

options usb-storage quirks=067b:2773:u

UAS offers less overhead, else this shouldn't be an issue.

You should try the same HDD with a different adapter from an other vendor (different VID) to really see if there's a difference in behavior in UAS mode.

Related Question