N2 unresponsive with USB HDD

Post Reply
thequietman44
Posts: 16
Joined: Sat Jun 01, 2019 6:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

N2 unresponsive with USB HDD

Unread post by thequietman44 » Wed Jun 05, 2019 9:40 am

I have an N2 4GB running the Mar 29 Ubuntu minimal image from a microSD card. I connected a 500GB USB 2.0 portable HD and set about formatting it ext4 ("mkfs.ext4 /dev/sda"). While formatting I lost my network connection to the N2 and subsequent pings returned "Request timeout".
Thinking it was a fluke I rebooted (unplugged power) the N2 and tried formatting again, this time successfully. I created a number of directories and exported one via NFS to test network/USB throughput, but as soon as I started copying a file the same thing happened. Disconnected session, can no longer ping N2.

I thought it might be the drive so I connected a different 1TB drive, formatted with no issues, exported via NFS, copied a file. Thinking all was good I left it running like that all day, then when I got home I ssh'd in and tried to remove my test file and directories with "rm -r" and the same thing happened. Rebooted, tried again, same thing.

Is this a known issue? I don't think it's power-related since I only have a single USB HD connected, and these are drives that have been in regular use elsewhere without issues. I had hoped to use my N2 as a NAS/home automation hub, but if it's this unstable with a single USB drive I can't really use it.

crashoverride
Posts: 4471
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 52 times
Contact:

Re: N2 unresponsive with USB HDD

Unread post by crashoverride » Wed Jun 05, 2019 9:45 am

thequietman44 wrote:
Wed Jun 05, 2019 9:40 am
Is this a known issue?
I have been using a dual drive setup (1 SSD + 1 HDD) on N2 since its release. Both devices are 2.5" and powered via USB. I have not encountered any issues. The USB-SATA bridge is from JMicron.

User avatar
odroid
Site Admin
Posts: 31381
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 54 times
Been thanked: 184 times
Contact:

Re: N2 unresponsive with USB HDD

Unread post by odroid » Wed Jun 05, 2019 10:15 am

Some people mentioned Kernel 4.9.177 could solved the external USB storage stability issues.
For example, viewtopic.php?f=177&t=35086

Update the system first via this simple instruction.
https://wiki.odroid.com/odroid-n2/os_im ... l_software

thequietman44
Posts: 16
Joined: Sat Jun 01, 2019 6:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: N2 unresponsive with USB HDD

Unread post by thequietman44 » Wed Jun 05, 2019 10:36 am

Thanks. I upgraded per those instructions as soon as I booted the system. I assume that upgrades the kernel but if not I'll check the version when I'm home.

thequietman44
Posts: 16
Joined: Sat Jun 01, 2019 6:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: N2 unresponsive with USB HDD

Unread post by thequietman44 » Wed Jun 05, 2019 1:00 pm

Just to confirm:

Code: Select all

$ uname -a
Linux odroid 4.9.177-28 #1 SMP PREEMPT Thu May 16 23:10:54 -03 2019 aarch64 aarch64 aarch64 GNU/Linux
Here's the list of USB devices:

Code: Select all

$ lsusb
Bus 002 Device 002: ID 05e3:0620 Genesys Logic, Inc. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 11b0:6298 ATECH FLASH TECHNOLOGY 
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

User avatar
odroid
Site Admin
Posts: 31381
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 54 times
Been thanked: 184 times
Contact:

Re: N2 unresponsive with USB HDD

Unread post by odroid » Wed Jun 05, 2019 1:54 pm

Ah.. you have a USB 2.0 storage not a USB 3.0 storage.
Can you show me "lsusb -t" and "lsmod" outputs?

Also check the dmesg output to find any relevant to this another USB 2.0 storage issue.
viewtopic.php?f=177&t=34790

thequietman44
Posts: 16
Joined: Sat Jun 01, 2019 6:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: N2 unresponsive with USB HDD

Unread post by thequietman44 » Wed Jun 05, 2019 2:36 pm

Code: Select all

$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p
, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p
, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=
usb-storage, 480M

Code: Select all

$ lsmod
Module                  Size  Used by
rtc_pcf8563            20480  0
i2c_meson_master       20480  0
sch_fq_codel           20480  2
nfsd                  430080  13
auth_rpcgss            73728  1 nfsd
nfs_acl                16384  1 nfsd
lockd                 118784  1 nfsd
grace                  16384  2 nfsd,lockd
amvdec_vp9            143360  0
amvdec_vc1             53248  0
amvdec_real            40960  0
amvdec_mmpeg4          20480  0
amvdec_mpeg4           53248  0
amvdec_mpeg12          90112  0
amvdec_mmjpeg          20480  0
amvdec_mjpeg           36864  0
amvdec_h265           118784  0
amvdec_h264mvc         49152  0
amvdec_mh264          139264  0
amvdec_h264           106496  0
sunrpc                446464  21 auth_rpcgss,nfsd,nfs_acl,lo
ckd
amvdec_avs             61440  0
stream_input          163840  13 amvdec_h265,amvdec_mjpeg,am
vdec_mh264,amvdec_mmpeg4,amvdec_h264mvc,amvdec_mmjpeg,amvdec
_real,amvdec_vp9,amvdec_h264,amvdec_mpeg12,amvdec_avs,amvdec
_vc1,amvdec_mpeg4
decoder_common        131072  14 amvdec_h265,amvdec_mjpeg,am
vdec_mh264,amvdec_mmpeg4,amvdec_h264mvc,amvdec_mmjpeg,amvdec
_real,stream_input,amvdec_vp9,amvdec_h264,amvdec_mpeg12,amvd
ec_avs,amvdec_vc1,amvdec_mpeg4
firmware               24576  15 amvdec_h265,amvdec_mjpeg,am
vdec_mh264,amvdec_mmpeg4,amvdec_h264mvc,amvdec_mmjpeg,decode
r_common,amvdec_real,stream_input,amvdec_vp9,amvdec_h264,amv
dec_mpeg12,amvdec_avs,amvdec_vc1,amvdec_mpeg4
media_clock            45056  2 decoder_common,stream_input
ip_tables              32768  0
x_tables               49152  1 ip_tables
ipv6                  483328  52

Code: Select all

[  864.505475] usb 1-1.4: new high-speed USB device number 3
 using xhci-hcd
[  864.631985] usb 1-1.4: New USB device found, idVendor=11b
0, idProduct=6298
[  864.632061] usb 1-1.4: New USB device strings: Mfr=1, Pro
duct=2, SerialNumber=3
[  864.632110] usb 1-1.4: Product: SNA-DC/U
[  864.632157] usb 1-1.4: Manufacturer: Kingston
[  864.632204] usb 1-1.4: SerialNumber: 30303030303030303037
3533
[  864.662601] usb-storage 1-1.4:1.0: USB Mass Storage devic
e detected
[  864.678120] scsi host0: usb-storage 1-1.4:1.0
[  865.690366] scsi 0:0:0:0: Direct-Access     Kingston SNA-
DC/U         1.14 PQ: 0 ANSI: 4
[  865.717558] sd 0:0:0:0: Attached scsi generic sg0 type 0
[  865.723164] sd 0:0:0:0: [sda] 976773167 512-byte logical
blocks: (500 GB/466 GiB)
[  865.726022] sd 0:0:0:0: [sda] Write Protect is off
[  865.726072] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
[  865.727884] sd 0:0:0:0: [sda] No Caching mode page found
[  865.728022] sd 0:0:0:0: [sda] Assuming drive cache: write
 through
[  865.804425] sd 0:0:0:0: [sda] Attached SCSI disk
[  867.326234] EXT4-fs (sda): recovery complete
[  867.326719] EXT4-fs (sda): mounted filesystem with ordere
d data mode. Opts: (null)/code]

User avatar
odroid
Site Admin
Posts: 31381
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 54 times
Been thanked: 184 times
Contact:

Re: N2 unresponsive with USB HDD

Unread post by odroid » Wed Jun 05, 2019 3:38 pm

It looks very normal.
Check the dmesg output again when you have a problem to access the USB HDD.

BTW, which power supply do you use?
Do you have a DMM to measure the VBUS 5V power rail stability?
Do you know the rated power consumption of your HDD?

thequietman44
Posts: 16
Joined: Sat Jun 01, 2019 6:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: N2 unresponsive with USB HDD

Unread post by thequietman44 » Thu Jun 06, 2019 1:55 am

I can't check dmesg output after the problem because the whole system becomes unresponsive.

I have the 12V/2A power supply from AmeriDroid, I purchased the N2 with case and power supply.

I have a multimeter. Where would I measure the voltage?

The 500GB is a Seagate drive rated at 5V 0.75A.

Ameridroid
Posts: 210
Joined: Thu Mar 17, 2016 4:19 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 12 times
Contact:

Re: N2 unresponsive with USB HDD

Unread post by Ameridroid » Thu Jun 06, 2019 3:00 am

thequietman44 wrote:
Thu Jun 06, 2019 1:55 am
I can't check dmesg output after the problem because the whole system becomes unresponsive.

I have the 12V/2A power supply from AmeriDroid, I purchased the N2 with case and power supply.

I have a multimeter. Where would I measure the voltage?

The 500GB is a Seagate drive rated at 5V 0.75A.
That power supply is the one supplied to us by Hardkernel. My guess is that because the HDD is using 0.75A at 5V, that corresponds to about 0.3125A at 12V. That means that there is about 1.6A @ 12V left for the N2. That may not be enough for the boot process, especially if the HDD pulls more than that at peak current. It may be a good idea to upgrade to a 12V/3A or larger power supply, at least for testing.

Unless odroid has another idea.

thequietman44
Posts: 16
Joined: Sat Jun 01, 2019 6:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: N2 unresponsive with USB HDD

Unread post by thequietman44 » Thu Jun 06, 2019 4:03 am

Ameridroid wrote:
Thu Jun 06, 2019 3:00 am
It may be a good idea to upgrade to a 12V/3A or larger power supply
It seems like this is the goto solution for a number of issues with SBCs, and in many cases the manufacturer later starts shipping larger power supplies. Why are the devices not sold with (or offered with the option of) a power supply that's capable of powering the device under full load? If I want to try running 4 bus-powered USB 3.0 SSDs while maxing out all 6 cores what kind of a power supply would be needed? Not that I would, but if I have to buy a different power supply I want it to be the last power supply I buy for this device.

Ameridroid
Posts: 210
Joined: Thu Mar 17, 2016 4:19 am
languages_spoken: english
Has thanked: 8 times
Been thanked: 12 times
Contact:

Re: N2 unresponsive with USB HDD

Unread post by Ameridroid » Thu Jun 06, 2019 10:24 am

thequietman44 wrote:
Thu Jun 06, 2019 4:03 am
It seems like this is the goto solution for a number of issues with SBCs, and in many cases the manufacturer later starts shipping larger power supplies. Why are the devices not sold with (or offered with the option of) a power supply that's capable of powering the device under full load? If I want to try running 4 bus-powered USB 3.0 SSDs while maxing out all 6 cores what kind of a power supply would be needed? Not that I would, but if I have to buy a different power supply I want it to be the last power supply I buy for this device.
Higher capacity power supplies cost more, and most people don't need more capacity for basic use. We offer this power supply that is designed for the ROCKPro64 (12V/5A), but it isn't an official Hardkernel power supply: https://ameridroid.com/products/12v-5a- ... ly-us-plug

thequietman44
Posts: 16
Joined: Sat Jun 01, 2019 6:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: N2 unresponsive with USB HDD

Unread post by thequietman44 » Thu Jun 06, 2019 10:43 am

I'm not one to quibble over a few dollars on the power supply price when buying a $85 board, but I understand the need to keep prices low. Thanks for the link.

I discovered my scanner uses a 12V/4A power supply with 5.5mmx2.1mm positive center plug; a pleasant surprise that I don't have to buy a new power supply for testing. Unfortunately the N2 still becomes unresponsive when trying to access the USB HD, but this time I can still ping it from the network and the program I was running (htop) is still displaying dynamic stats in the SSH session, so... improvement?

I'll try a couple different tests with both USB HDs to see if the above is consistent.

thequietman44
Posts: 16
Joined: Sat Jun 01, 2019 6:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: N2 unresponsive with USB HDD

Unread post by thequietman44 » Fri Jun 07, 2019 2:13 pm

I verified with both HDs running on the 12V/4A power supply the N2 becomes unresponsive, but I can still ping it and see live updates on the screen. Switched to the 12V/2A power supply and it drops off the network and the screen output freezes.

User avatar
odroid
Site Admin
Posts: 31381
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 54 times
Been thanked: 184 times
Contact:

Re: N2 unresponsive with USB HDD

Unread post by odroid » Fri Jun 07, 2019 6:11 pm

Is the blue LED on the N2 still flashing like heartbeat?

thequietman44
Posts: 16
Joined: Sat Jun 01, 2019 6:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: N2 unresponsive with USB HDD

Unread post by thequietman44 » Fri Jun 07, 2019 11:55 pm

Yes, using both power supplies the blue LED is still flashing and the red LED is lit.

User avatar
odroid
Site Admin
Posts: 31381
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 54 times
Been thanked: 184 times
Contact:

Re: N2 unresponsive with USB HDD

Unread post by odroid » Sat Jun 08, 2019 10:35 am

Still we haven't found a root cause.
Is the 1TB storage has USB 3.0 interface while 500GB has USB 2.0?
And was there no issue with 1TB HDD?

thequietman44
Posts: 16
Joined: Sat Jun 01, 2019 6:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: N2 unresponsive with USB HDD

Unread post by thequietman44 » Sat Jun 08, 2019 12:15 pm

Both are USB 2.0, both have the same issue. I don't currently have any USB 3.0 HDs, just USB 3.0 flash drives.

User avatar
odroid
Site Admin
Posts: 31381
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 54 times
Been thanked: 184 times
Contact:

Re: N2 unresponsive with USB HDD

Unread post by odroid » Mon Jun 10, 2019 9:01 am

Please change the CPU governor to "Performance" and test it again.
https://wiki.odroid.com/odroid-xu4/appl ... q_govornor

BTW, do you know the chipset brand/model name of your USB 2.0 to SATA enclosure bridge?
We may need to buy the same one to reproduce the issue.

thequietman44
Posts: 16
Joined: Sat Jun 01, 2019 6:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: N2 unresponsive with USB HDD

Unread post by thequietman44 » Sat Jun 15, 2019 5:22 am

I changed the CPU governor to Performance. I also ran apt update && apt full-upgrade just in case there have been any improvements.

I'm not sure what the chipset is, but my USB 2.0 enclosure shows up as "Kingston SNA-DC/U". It's an older enclosure they used to ship with their SSDs so you could put your old HDD in it for transfer/backup.

The N2 has been up and running with USB HDD connected for about a week with no issues as long as I don't try to access anything on the HDD. I just ran dd if=/dev/sda of=/dev/null and it immediately died, SSH disconnected and the device is no longer responding to pings.

User avatar
odroid
Site Admin
Posts: 31381
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 54 times
Been thanked: 184 times
Contact:

Re: N2 unresponsive with USB HDD

Unread post by odroid » Mon Jun 17, 2019 12:26 pm

How was the blue and red LED status on the N2 board when you ran "dd" command?

thequietman44
Posts: 16
Joined: Sat Jun 01, 2019 6:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: N2 unresponsive with USB HDD

Unread post by thequietman44 » Tue Jun 18, 2019 11:37 am

I wasn't near the N2 when I ran dd, but when I got home there was no blue LED, just a solid red LED.

Another data point: I got a USB Y-cable (male USB-A data+power & male USB-A power only) and connected the power only end to a 2.1A USB charger, then connected the data+power end to the N2. I ran the dd command again and it immediately froze, then disconnected. The red LED was solid and the blue LED was flashing. Not sure if that tells us anything, but I think I've done all I can to eliminate power-related issues with a 4A power supply for the N2 and USB Y-cable for the drive.

User avatar
odroid
Site Admin
Posts: 31381
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 54 times
Been thanked: 184 times
Contact:

Re: N2 unresponsive with USB HDD

Unread post by odroid » Tue Jun 18, 2019 11:55 am

Yes, it seems not to be a power stability issue.

Can you reduce the queue size to 32KB and run the same DD command?
echo 32 > /sys/class/block/sda/queue/max_sectors_kb

thequietman44
Posts: 16
Joined: Sat Jun 01, 2019 6:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: N2 unresponsive with USB HDD

Unread post by thequietman44 » Tue Jun 18, 2019 12:23 pm

If I change the queue size to 32KB it does not freeze, but it does slow down the transfer to about 22MB/sec. Increasing the size to 64KB speeds up the transfer to 31MB/sec with no issues so far.

If I run cat /sys/class/block/sda/queue/max_hw_sectors_kb I get 120 and it will not let me set a size over that, i.e. echo 128 > /sys/class/block/sda/queue/max_sectors_kb.

User avatar
mad_ady
Posts: 6178
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 123 times
Been thanked: 89 times
Contact:

Re: N2 unresponsive with USB HDD

Unread post by mad_ady » Tue Jun 18, 2019 12:45 pm

31MB/s is quite good for a usb2 device. There's a thread around with an example how to set that workaround with a udev rule

thequietman44
Posts: 16
Joined: Sat Jun 01, 2019 6:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: N2 unresponsive with USB HDD

Unread post by thequietman44 » Tue Jun 18, 2019 1:00 pm

Yes, 31MB/s is fine for archiving and backups. If it can operate reliably that's an acceptable workaround. Just curious why the max_sectors_kb needs to be changed; is that a bug in firmware/software? Will there be a permanent fix or is the workaround going to be the best option for the foreseeable future?

I have a USB 3.0 enclosure on order to put a spare 120GB SSD in, so I'll be interested to see what kind of performance it can reliably achieve with a fast USB 3.0 drive.

User avatar
odroid
Site Admin
Posts: 31381
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 54 times
Been thanked: 184 times
Contact:

Re: N2 unresponsive with USB HDD

Unread post by odroid » Tue Jun 18, 2019 1:40 pm

Our internal engineers as well as Amlogic people have been investigating the USB stability issue around 3 weeks but we couldn't find a real root cause yet.
Therefore, we keep trying to find it.

User avatar
tobetter
Posts: 3698
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 28 times
Been thanked: 117 times
Contact:

Re: N2 unresponsive with USB HDD

Unread post by tobetter » Tue Jul 09, 2019 12:18 am

I've missed this thread about USB issue, please follow up the instruction in the link and test with your USB HDD.
viewtopic.php?f=181&t=35031&p=261725&hilit=uas#p261377

thequietman44
Posts: 16
Joined: Sat Jun 01, 2019 6:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: N2 unresponsive with USB HDD

Unread post by thequietman44 » Tue Jul 09, 2019 12:31 am

I tried the workaround and it stabilizes the N2, but the performance penalty negates any advantage the N2 had over other SBCs. I ordered the newly-released 4th gen of a berry-flavored tart board and if that can provide decent USB 3.0/GigE throughput I'll probably transition to that instead.

User avatar
tobetter
Posts: 3698
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 28 times
Been thanked: 117 times
Contact:

Re: N2 unresponsive with USB HDD

Unread post by tobetter » Tue Jul 09, 2019 12:36 am

thequietman44 wrote:
Tue Jul 09, 2019 12:31 am
I tried the workaround and it stabilizes the N2, but the performance penalty negates any advantage the N2 had over other SBCs. I ordered the newly-released 4th gen of a berry-flavored tart board and if that can provide decent USB 3.0/GigE throughput I'll probably transition to that instead.
Sorry to hear that the performance gets low which is expected when the patches are released. But if you have a chance to test more, you would be able to test the stability without the kernel parameter usb-xhci.tablesize or increase its value. My observation is that the value affects the performance and higher gives better. Are you running more than 2 drives? With 1 driver does not have an issue on my testing.

thequietman44
Posts: 16
Joined: Sat Jun 01, 2019 6:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: N2 unresponsive with USB HDD

Unread post by thequietman44 » Tue Jul 09, 2019 11:41 pm

I installed the latest updates via apt install && apt upgrade, beyond that I have not made any config changes other than setting max_sectors_kb to 32. I haven't noticed any difference in speed or stability with the same 1 drive connected, still about 20MB/sec read/write. 64 appeared to be working but I had intermittent freezing, so I've settled on 32 for stability reasons.

As part of my ongoing transition I ordered four USB 3.0-to-SATA adapters for testing (JMicron JMS578 bridge) and I paired them with four USB 3.0 Y-cables so I can power the drives from a separate USB port to eliminate power overdraw issues. The only identical 2.5" drives I have are a set of 4 Kingston 256GB SSDs (SKC400s37/256G) so I'll be using those for testing. I also picked up a USB 3.1 multitester to verify power draw.

To verify the setup is working I connected the USB tester to the N2, verified I was seeing 5.1V and 0.0A draw, then connected 1 Kingston SSD with a USB-SATA adapter. When I plugged it in the voltage momentarily dropped from 5.1V to 4.98V but then stabilized around 5.0V. Current likewise spiked to 0.68A then settled down to 0.15A. In this configuration I was able to format the disk as ext4, then read and write several GB of files. During write operations the current jumped to 0.85A, but overall stayed within USB 3.0 specs.

For my second test I kept the same setup, but connected the USB-SATA adapter to the USB Y-cable, with the data end in the USB tester and the power end in a separate 2A USB charger. In this configuration the voltage and current remained relatively steady at 5.0V and 0.16A regardless of read/write operations. This confirmed the Y-cable was supplying adequate power to the drive independent of the N2 USB port.

With the first group (SSD -> USB-SATA -> Y-cable -> N2) working, I moved the USB tester to a different USB port and reconnected the first group directly to the N2. I then connected a second identical group to the USB tester and observed identical readings, 5.0V and about 0.16A. Both drives appeared to be working.

I removed the USB tester from the picture and connected a third group to the N2. This time the drive did not show up and instead I got some red warning messages in dmesg:

Code: Select all

[50620.351983] usb 2-1.2.2: new SuperSpeed USB device number 69 using xhci-hcd
[50620.373192] usb 2-1.2.2: New USB device found, idVendor=152d, idProduct=0578
[50620.373204] usb 2-1.2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[50620.373212] usb 2-1.2.2: Product: JMS579
[50620.373219] usb 2-1.2.2: Manufacturer: JMicron
[50620.373227] usb 2-1.2.2: SerialNumber: 5002627268015264
[50620.380607] scsi host4: uas
[50620.386447] scsi 4:0:0:0: Direct-Access     KINGSTON  SKC400S37256G   3202 PQ: 0 ANSI: 6
[50620.421035] sd 4:0:0:0: [sde] 500118192 512-byte logical blocks: (256 GB/238 GiB)
[50620.421043] sd 4:0:0:0: [sde] 4096-byte physical blocks
[50620.421804] sd 4:0:0:0: [sde] Write Protect is off
[50620.421814] sd 4:0:0:0: [sde] Mode Sense: 53 00 00 08
[50620.422286] sd 4:0:0:0: [sde] Disabling FUA
[50620.422296] sd 4:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[50620.422478] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[50620.426581] xhci-hcd xhci-hcd.0.auto: @00000000cf612440 00000000 00000000 1b000000 05078001
[50620.435493] sd 4:0:0:0: [sde] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
[50620.435775] sd 4:0:0:0: Attached scsi generic sg0 type 0
[50620.446247]  sde: sde1 sde2
[50620.450028] sd 4:0:0:0: [sde] Attached SCSI disk
[50620.594816] sd 4:0:0:0: [sde] tag#15 data cmplt err -71 uas-tag 5 inflight: CMD
[50620.594828] sd 4:0:0:0: [sde] tag#15 CDB: Read(10) 28 00 1d cf 2f d8 00 00 28 00
[50620.594886] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[50620.598985] xhci-hcd xhci-hcd.0.auto: @00000000cf612e30 00000000 00000000 04000000 05078001
[50625.683679] scsi host4: uas_pre_reset: timed out
[50625.683787] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[50625.692552] xhci-hcd xhci-hcd.0.auto: @00000000cf612240 00000000 00000000 1b000000 05058001
[50625.701513] sd 4:0:0:0: [sde] tag#13 uas_zap_pending 0 uas-tag 3 inflight: CMD
[50625.701530] sd 4:0:0:0: [sde] tag#13 CDB: Read(10) 28 00 1d cf 2f 68 00 00 40 00
[50625.701555] sd 4:0:0:0: [sde] tag#13 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[50625.701562] sd 4:0:0:0: [sde] tag#13 CDB: Read(10) 28 00 1d cf 2f 68 00 00 40 00
[50625.701568] blk_update_request: I/O error, dev sde, sector 500117352
[50625.707563] sd 4:0:0:0: [sde] tag#14 uas_zap_pending 0 uas-tag 4 inflight: CMD
[50625.707573] sd 4:0:0:0: [sde] tag#14 CDB: Read(10) 28 00 1d cf 2f a8 00 00 28 00
[50625.707591] sd 4:0:0:0: [sde] tag#14 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[50625.707599] sd 4:0:0:0: [sde] tag#14 CDB: Read(10) 28 00 1d cf 2f a8 00 00 28 00
[50625.707603] blk_update_request: I/O error, dev sde, sector 500117416
[50625.714095] sd 4:0:0:0: [sde] tag#15 uas_zap_pending 0 uas-tag 5 inflight: CMD
[50625.714108] sd 4:0:0:0: [sde] tag#15 CDB: Read(10) 28 00 1d cf 2f d8 00 00 28 00
[50625.714128] sd 4:0:0:0: [sde] tag#15 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[50625.714136] sd 4:0:0:0: [sde] tag#15 CDB: Read(10) 28 00 1d cf 2f d8 00 00 28 00
[50625.714141] blk_update_request: I/O error, dev sde, sector 500117464
[50625.725715] sd 4:0:0:0: [sde] Synchronizing SCSI cache
[50625.731690] blk_update_request: I/O error, dev sde, sector 500117288
[50625.732594] Buffer I/O error on dev sde, logical block 62514661, async page read
[50625.747663] blk_update_request: I/O error, dev sde, sector 4096
[50625.763710] blk_update_request: I/O error, dev sde, sector 4096
[50625.764174] Buffer I/O error on dev sde, logical block 512, async page read
[50625.991699] sd 4:0:0:0: [sde] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[50626.107762] usb 2-1.2.2: reset SuperSpeed USB device number 69 using xhci-hcd
[50626.134982] scsi host4: uas
Just for laughs I connected the fourth group and it wasn't even recognized by the N2; lsusb showed only 3 JMicron devices. Shortly afterwards the third group errored out and stopped working. I rebooted the N2 with all 4 groups connected and it wouldn't even boot, just sat there with the red LED on and the blue LED doing the heartbeat, not responding to pings. I disconnected all but the first group and power cycled the N2 which then booted up.

So even with USB 3.0 drives using external power, and the performance throttling workaround in place, the N2 seems unable to reliably support more than 2 USB drives. If manually editing the usb-xhci.tablesize parameter will help I can try that if there's a recommended value.

rosenrot
Posts: 33
Joined: Wed Apr 10, 2019 2:37 am
languages_spoken: english
ODROIDs: n2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: N2 unresponsive with USB HDD

Unread post by rosenrot » Fri Jul 19, 2019 2:17 pm

I just faced the exact same problem yesterday with my Seagate Backup Plus Portable 4TB. It was the first time for me but it happened like explained in the first post. Additionally, write, copy or any command related to the HDD freezed the N2. Even after the restart the problem persisted. At some point it was working again.

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 0 guests