Cannot read from two USB HDDs at the same time on XU4

Moderators: odroid, mdrjr

Cannot read from two USB HDDs at the same time on XU4

Unread postby bobobo1618 » Wed Dec 05, 2018 2:46 am

I'm using Ubuntu with a recent kernel on an ODROID XU4 but I've discovered that it's not possible to read from two USB HDDs at the same time.

My setup:

  • Two Seagate STEA4000400 portable hard drives connected directly to the XU4's USB port.
  • Hardkernel's provided power supply
  • Kernel 4.14.83+ compiled from Hardkernel sources
  • Booting from SD card
  • SSHing to the board over ethernet

Steps to reproduce:

  • Connect drives
  • Run
    Code: Select all
    dd if=/dev/sda of=/dev/null bs=4M status=progress iflag=direct
  • At the same time, run
    Code: Select all
    dd if=/dev/sdb of=/dev/null bs=4M status=progress iflag=direct

100% of the time, one of the drives continues reading at full speed (usually but not always the second) while the other freezes completely.

When using the UAS driver, I see messages like this in dmesg:

Code: Select all
Dec 04 15:58:57 odroid kernel: sd 0:0:0:0: [sda] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD IN
Dec 04 15:58:57 odroid kernel: sd 0:0:0:0: [sda] tag#1 CDB: opcode=0x88 88 00 00 00 00 00 00 3b 0c 00 00 00 04 00 00 00
Dec 04 15:58:57 odroid kernel: sd 0:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
Dec 04 15:58:57 odroid kernel: sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 00 3b 08 00 00 00 04 00 00 00
Dec 04 15:58:57 odroid kernel: scsi host0: uas_eh_device_reset_handler start
Dec 04 15:58:57 odroid kernel: usb 4-1.1: reset SuperSpeed USB device number 4 using xhci-hcd
Dec 04 15:58:57 odroid kernel: scsi host0: uas_eh_device_reset_handler success


After blacklisting UAS, the errors go away but the behaviour continues.

On my other computers, running Arch Linux with kernel 4.18.16, the behaviour does not occur at all, so I don't believe this is a problem with the drives themselves.
bobobo1618
 
Posts: 5
Joined: Wed Dec 05, 2018 2:36 am
languages_spoken: english
ODROIDs: XU4, C2

Re: Cannot read from two USB HDDs at the same time on XU4

Unread postby bobobo1618 » Wed Dec 05, 2018 3:17 am

I thought to try with different devices so I tried with USB thumb drives. Those work perfectly.

I suspect it might be some kind of power issue, after reading this thread: viewtopic.php?f=86&t=10025

Also after reading that thread, I think my power adapter may be the problem. I'll try to find another one.
bobobo1618
 
Posts: 5
Joined: Wed Dec 05, 2018 2:36 am
languages_spoken: english
ODROIDs: XU4, C2

Re: Cannot read from two USB HDDs at the same time on XU4

Unread postby rooted » Wed Dec 05, 2018 4:42 am

I was about to reply may be a power issue. Try switching the drives supplies and run the test again.
User avatar
rooted
 
Posts: 5908
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english

Re: Cannot read from two USB HDDs at the same time on XU4

Unread postby bobobo1618 » Fri Dec 07, 2018 2:45 am

So the replacement power supply arrived and fixed the problem.

Something quite interesting happened though. The power supply that arrived appears to be the same as the one I had, albeit with an EU plug rather than a US plug. Both have the model KPC-020B. The only differences as far as I can see are the certification markings and the number at the very bottom right.

I'm curious why the same model adapter works fine where the other didn't.
bobobo1618
 
Posts: 5
Joined: Wed Dec 05, 2018 2:36 am
languages_spoken: english
ODROIDs: XU4, C2

Re: Cannot read from two USB HDDs at the same time on XU4

Unread postby bobobo1618 » Fri Dec 07, 2018 4:11 am

Actually it appears my success was short-lived. I was able to read from two concurrently for a while but now I'm seeing these again:

Code: Select all
[  889.840216] sd 1:0:0:0: [sdb] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD IN
[  889.840238] sd 1:0:0:0: [sdb] tag#1 CDB: opcode=0x88 88 00 00 00 00 00 00 0e 38 00 00 00 04 00 00 00
[  889.840608] sd 1:0:0:0: [sdb] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
[  889.840620] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 00 0e 34 00 00 00 04 00 00 00
[  889.864249] scsi host1: uas_eh_device_reset_handler start
[  889.944483] usb 4-1.2: reset SuperSpeed USB device number 4 using xhci-hcd
[  889.967580] scsi host1: uas_eh_device_reset_handler success
[  924.656246] sd 1:0:0:0: [sdb] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: IN
[  924.656264] sd 1:0:0:0: [sdb] tag#1 CDB: opcode=0x88 88 00 00 00 00 00 00 18 44 00 00 00 04 00 00 00
[  924.680228] scsi host1: uas_eh_device_reset_handler start
[  924.760456] usb 4-1.2: reset SuperSpeed USB device number 4 using xhci-hcd
[  924.788026] scsi host1: uas_eh_device_reset_handler success


Since I've been able to do it on this power supply before I don't think that's the problem. I've ordered a powered USB hub to find out for sure.

At this point I'm wondering if it has something to do with temperature or something like that.
bobobo1618
 
Posts: 5
Joined: Wed Dec 05, 2018 2:36 am
languages_spoken: english
ODROIDs: XU4, C2

Re: Cannot read from two USB HDDs at the same time on XU4

Unread postby rooted » Fri Dec 07, 2018 5:39 am

The drives you are using aren't self powered?
User avatar
rooted
 
Posts: 5908
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english

Re: Cannot read from two USB HDDs at the same time on XU4

Unread postby odroid » Fri Dec 07, 2018 9:43 am

I think USB host output power seems not to enough to handle this two USB 2.5" HDDs at the same time.
https://www.amazon.com/Seagate-Expansio ... 017KE8OG0/

In that case, a powered USB hub might solve the issue.
User avatar
odroid
Site Admin
 
Posts: 29098
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Cannot read from two USB HDDs at the same time on XU4

Unread postby elatllat » Fri Dec 07, 2018 10:35 am

I have been writing up to ~20 drives simultaneously for years without issue on the XU4, but they all have dedicated power.
elatllat
 
Posts: 1097
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1

Re: Cannot read from two USB HDDs at the same time on XU4

Unread postby bobobo1618 » Sat Dec 08, 2018 4:25 am

The drives are 2.5" and rely on USB power.

The powered hub has arrived and things seem to mostly work now, though I had to blacklist UAS (presumably because Linux doesn't support Seagate's oddities for this particular drive).

I now suspect the 6A adapter may also solve my problem but it's difficult to obtain one where I am, the local distributors only seem to have the 4A.
bobobo1618
 
Posts: 5
Joined: Wed Dec 05, 2018 2:36 am
languages_spoken: english
ODROIDs: XU4, C2


Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 2 guests