N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post Reply
superpowter77
Posts: 366
Joined: Mon Sep 09, 2019 9:14 pm
languages_spoken: english,french,spanish
ODROIDs: N2(x2),N2+,C4,HC4
Has thanked: 131 times
Been thanked: 39 times
Contact:

N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by superpowter77 »

We should make a list of working USB3 to SATA adapters/caddy's. Just found out, this has been my main headache with odroid products since I started it using them in Sep 2019. It does affect C4 as well. I own a bunch of USB3 to SATA adapters, mostly from ASM media chipsets because they work great with my other ARM64 SBC boards as Rpi 4(3), NanopiM4V2, and Rockpro64. Unfortunately, around 90% of my stock(around 13 adapters) are not compatible with Odroid products. BTW, I only use well known brand names for SSD drives, nothing of low price Chinese SSD brands. Ex. When I flash ubuntu minimal server images to my SSD drives to boot from USB3 SSD, if I don't use a specific(working) chipset, it will not boot up in CLI mode, just a blank screen or a HDMI signal issue. Also, petiboot acts funny too by taking around 30-40 seconds to detect my SSD drives. When I use the right/specific adapter for N2/N2Plus and C4, it works right away in CLI mode and petiboot takes less than 1 second to recognized all my SSD drives. I thought it was my TV/Monitors, my N2's, PSU, HDMI cables, microsd cards etc etc and I even blame HK for it. I ended buying a bunch of SSD's, microsd cards, USB 3 to SATA adapters, PSU's and HDMI cables just to make sure. To make story short, I only have one(1) out of 14 that actually work 100% with my current Odroid's line-up: 2 N2's, 1 N2Plus, 1 C4.
It uses ASM1153 chipset and it's an old adapter which I bought back in 2017
ELEGIANT USB 3.0 to SATA, Super Speed USB 3.0 to SATA
I already ordered 2 more just in case. I may need to flash to latest firmware for each one of my USB3 to SATA adapters to see if it makes them work with my nitpick Odroids.
Oh Odroids!, so much tinkering to make them work properly.
These users thanked the author superpowter77 for the post:
m_ueberall (Fri Aug 21, 2020 4:24 pm)

soerenderfor
Posts: 111
Joined: Sun Jun 17, 2018 10:01 pm
languages_spoken: Danish, English
ODROIDs: ODROID U3, ODROID C2, ODROID XU4, ODROID N2, ODROID H2.
Has thanked: 7 times
Been thanked: 15 times
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by soerenderfor »

The USB3 to SATA from odroid, did you try it?

superpowter77
Posts: 366
Joined: Mon Sep 09, 2019 9:14 pm
languages_spoken: english,french,spanish
ODROIDs: N2(x2),N2+,C4,HC4
Has thanked: 131 times
Been thanked: 39 times
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by superpowter77 »

soerenderfor wrote:
Wed Aug 05, 2020 5:12 pm
The USB3 to SATA from odroid, did you try it?
Never tried it, only 64bit linux OS, as Armbian, Archlinux, Manjaro and all Ubuntu flavors available to N2's.

soerenderfor
Posts: 111
Joined: Sun Jun 17, 2018 10:01 pm
languages_spoken: Danish, English
ODROIDs: ODROID U3, ODROID C2, ODROID XU4, ODROID N2, ODROID H2.
Has thanked: 7 times
Been thanked: 15 times
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by soerenderfor »

@superpowter77 - I ment the USB3 to SATA adapter from odroid, did you try that adapter?

superpowter77
Posts: 366
Joined: Mon Sep 09, 2019 9:14 pm
languages_spoken: english,french,spanish
ODROIDs: N2(x2),N2+,C4,HC4
Has thanked: 131 times
Been thanked: 39 times
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by superpowter77 »

soerenderfor wrote:
Wed Aug 05, 2020 10:51 pm
@superpowter77 - I ment the USB3 to SATA adapter from odroid, did you try that adapter?
https://www.hardkernel.com/shop/usb3-0- ... oard-plus/
I haven't. I forgot to purchase one when I ordered the last 2 times from them.
I will order some adapters around same JMicron JMS578 chipset to see how it goes.

soerenderfor
Posts: 111
Joined: Sun Jun 17, 2018 10:01 pm
languages_spoken: Danish, English
ODROIDs: ODROID U3, ODROID C2, ODROID XU4, ODROID N2, ODROID H2.
Has thanked: 7 times
Been thanked: 15 times
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by soerenderfor »

@superpowter77 - The adapter worked as it should on my XU4, i can test it on N2 later tomorrow.

superpowter77
Posts: 366
Joined: Mon Sep 09, 2019 9:14 pm
languages_spoken: english,french,spanish
ODROIDs: N2(x2),N2+,C4,HC4
Has thanked: 131 times
Been thanked: 39 times
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by superpowter77 »

soerenderfor wrote:
Thu Aug 06, 2020 1:57 am
@superpowter77 - The adapter worked as it should on my XU4, i can test it on N2 later tomorrow.
I appreciate it, if you can transfer files between SSD/HDD drives, it'd awesome.
If you are able, maybe you can run this to check on the transfer speeds performance:
sudo dd if=/dev/sda of=/dev/null bs=16M count=256

soerenderfor
Posts: 111
Joined: Sun Jun 17, 2018 10:01 pm
languages_spoken: Danish, English
ODROIDs: ODROID U3, ODROID C2, ODROID XU4, ODROID N2, ODROID H2.
Has thanked: 7 times
Been thanked: 15 times
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by soerenderfor »

No prob, will return tomorrow

Truly
Posts: 30
Joined: Sun Nov 03, 2019 8:53 am
languages_spoken: english
ODROIDs: N2
Has thanked: 19 times
Been thanked: 1 time
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by Truly »

Hi everyone,

I've searched the N2 forums around USB3 to SATA adapter problems with SSDs and found couple of threads like this and this one.

Instead of raising a new topic, I'll post here, but let me know if it's better to separate.

I have N2 4GB version and 2 TB WD Passport HDD with ubuntu minimal:

Code: Select all

uname -a
Linux odroid 4.9.230-75 #1 SMP PREEMPT Tue Aug 11 12:03:57 -03 2020 aarch64 aarch64 aarch64 GNU/Linux
I've bought Samsung EVO 860 1TB and connected it to N2 using MAIWO USB3.0 to SATA adapter that is bases on JMS578 chip.
Mount was successful.
I found out the firmware version using the firmware update utility:

Code: Select all

sudo ./JMS578FwUpdate -d /dev/sdb -v
Bridge Firmware Version: v130.3.0.1
Here is the syslog output when I connect the SSD:

Code: Select all

Aug 17 11:37:19 odroid kernel: [ 1399.250148@4] usb 2-1.3: new SuperSpeed USB device number 4 using xhci-hcd
Aug 17 11:37:19 odroid kernel: [ 1399.271002@4] usb 2-1.3: New USB device found, idVendor=152d, idProduct=0578
Aug 17 11:37:19 odroid kernel: [ 1399.271005@4] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 17 11:37:19 odroid kernel: [ 1399.271007@4] usb 2-1.3: Product: USB 3.0 Device
Aug 17 11:37:19 odroid kernel: [ 1399.271009@4] usb 2-1.3: Manufacturer: USB 3.0 Device
Aug 17 11:37:19 odroid kernel: [ 1399.271011@4] usb 2-1.3: SerialNumber: 0000000045F0
Aug 17 11:37:19 odroid kernel: [ 1399.271412@4] usb-storage 2-1.3:1.0: USB Mass Storage device detected
Aug 17 11:37:19 odroid kernel: [ 1399.278931@4] usb-storage 2-1.3:1.0: Quirks match for vid 152d pid 0578: 1000000
Aug 17 11:37:19 odroid kernel: [ 1399.279023@4] scsi host1: usb-storage 2-1.3:1.0
Aug 17 11:37:20 odroid kernel: [ 1400.310528@0] scsi 1:0:0:0: Direct-Access     Samsung  SSD 860 EVO 1TB  0301 PQ: 0 ANSI: 6
Aug 17 11:37:20 odroid kernel: [ 1400.311460@0] sd 1:0:0:0: Attached scsi generic sg2 type 0
Aug 17 11:37:20 odroid kernel: [ 1400.311748@0] sd 1:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
Aug 17 11:37:20 odroid kernel: [ 1400.312011@0] sd 1:0:0:0: [sdb] Write Protect is off
Aug 17 11:37:20 odroid kernel: [ 1400.312017@0] sd 1:0:0:0: [sdb] Mode Sense: 47 00 00 08
Aug 17 11:37:20 odroid kernel: [ 1400.312334@0] sd 1:0:0:0: [sdb] Disabling FUA
Aug 17 11:37:20 odroid kernel: [ 1400.312340@0] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Aug 17 11:37:20 odroid kernel: [ 1400.313740@0]  sdb: sdb1
Aug 17 11:37:20 odroid kernel: [ 1400.315440@0] sd 1:0:0:0: [sdb] Attached SCSI disk
Aug 17 11:37:20 odroid systemd[1]: Starting usbmount@dev-sdb.service...
Aug 17 11:37:20 odroid systemd[1]: Starting usbmount@dev-sdb1.service...
Aug 17 11:37:21 odroid usbmount[4690]: /dev/sdb does not contain a filesystem or disklabel
Aug 17 11:37:21 odroid systemd[1]: Started usbmount@dev-sdb.service.
Aug 17 11:37:26 odroid usbmount[4700]: executing command: mount -text4 -osync,noexec,nodev,noatime,nodiratime /dev/sdb1 /media/usb1
Aug 17 11:37:26 odroid kernel: [ 1405.561421@0] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
Aug 17 11:37:26 odroid usbmount[4700]: executing command: run-parts /etc/usbmount/mount.d
Aug 17 11:37:26 odroid systemd[1]: Started usbmount@dev-sdb1.service.
I ran some tests and compared it to HKs USB3.0 to SATA adapter :
  1. Write DD test

    Code: Select all

    dd if=/dev/zero of=test oflag=direct bs=4M count=256
    256+0 records in
    256+0 records out
    1073741824 bytes (1.1 GB, 1.0 GiB) copied, 4.20163 s, 256 MB/s
  2. Read DD test

    Code: Select all

    dd if=test of=/dev/null iflag=direct bs=4M
    256+0 records in
    256+0 records out
    1073741824 bytes (1.1 GB, 1.0 GiB) copied, 3.32382 s, 323 MB/s
  3. IOzone

    Code: Select all

    iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2
            Iozone: Performance Test of File I/O
                    Version $Revision: 3.429 $
                    Compiled for 64 bit mode.
                    Build: linux
    
            Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins
                         Al Slater, Scott Rhine, Mike Wisner, Ken Goss
                         Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
                         Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,
                         Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone,
                         Erik Habbinga, Kris Strecker, Walter Wong, Joshua Root,
                         Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren Sawyer,
                         Vangel Bojaxhi, Ben England, Vikentsi Lapa.
    
            Run began: Mon Aug 17 16:04:49 2020
    
            Include fsync in write timing
            O_DIRECT feature enabled
            Auto Mode
            File size set to 102400 kB
            Record Size 4 kB
            Record Size 16 kB
            Record Size 512 kB
            Record Size 1024 kB
            Record Size 16384 kB
            Command line used: iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2
            Output is in kBytes/sec
            Time Resolution = 0.000001 seconds.
            Processor cache size set to 1024 kBytes.
            Processor cache line size set to 32 bytes.
            File stride size set to 17 * record size.
                                                                  random    random     bkwd    record    stride
                  kB  reclen    write  rewrite    read    reread    read     write     read   rewrite      read   fwrite frewrite    fread  freread
              102400       4     1079     1588    29088    28909    19288     1573
              102400      16     2514     5701    91789    99049    66076     5671
              102400     512    59422    99801   262535   269925   272059    87058
              102400    1024   102363   143677   267962   281164   289241   143013
              102400   16384   267261   294555   296791   301547   302607   300562
    
    iozone test complete.
  4. hdparm

    Code: Select all

    sudo hdparm -Tt /dev/sdb
    
    /dev/sdb:
     Timing cached reads:   3626 MB in  2.00 seconds = 1813.46 MB/sec
     Timing buffered disk reads: 670 MB in  3.01 seconds = 222.79 MB/sec
DD tests are comparable, while IOzone test shows I have terrible write performance with anything less than 16384k.

Does anyone see anything out of the ordinary?
Is there anything I can do to improve the write speed?

The other issue I have is that N2 will not reboot while having SSD connected. I need to disconnect it, power-off and power-on in order to boot.
Mounting SSD within fstab doesn't help either.
These users thanked the author Truly for the post:
m_ueberall (Wed Aug 19, 2020 1:44 pm)

User avatar
m_ueberall
Posts: 39
Joined: Thu Jul 23, 2020 6:13 pm
languages_spoken: english, german
ODROIDs: N2+
Location: Hanau, Germany
Has thanked: 35 times
Been thanked: 17 times
Contact:

N2Plus: Crucial MX500, StarTech USB3S2SAT3CB test results (verdict: works well with newer kernels!)

Post by m_ueberall »

Today I managed to get my hands on a Crucial MX500 SSD and a StarTech USB3S2SAT3CB cable (apparently containing an ASMT ASM105x controller) and ran some tests using kernels 4.9.230 (updated base image: "Ubuntu Minimal image") and 5.7.14 (updated base image: @tobetter's "ubuntu-20.04-server-odroidn2plus-20200716.img.xz").
The important finding is that the former activated "Quirks mode" and used the slower usb-storage driver, while the latter used the uas driver (as expected for this cable which has been recommended e.g. in Raspberry Pi discussion forums earlier).
tobetter wrote:
Wed Aug 26, 2020 11:14 pm
@m_ueberall, Thanks for sharing the test. I am wondering if what CPU frequency and governor have been used when you test them.
EDIT: I originally forgot to ensure that the 5.7 kernel used the same frequencies/governor as the 4.9 kernel (shown below), so I reran the second set of tests and kept the original values (for governor "ondemand") for comparison.

Code: Select all

# cpufreq-info|egrep "governor |frequency is"|sort|uniq
                  The governor "performance" may decide which speed to use
  current CPU frequency is 2.02 GHz (asserted by call to hardware).
  current CPU frequency is 2.40 GHz (asserted by call to hardware).
As explained elsewhere, this makes a huge difference:
  1. hdparm -tT /dev/sda (cached, buffered disk reads): 1905.35 MB/sec, 250.88 MB/sec vs. 2181.34 MB/sec, 372.23 MB/sec (governor "ondemand": 1901.39 MB/sec, 355.82 MB/sec)
  2. hdparm -tT --direct /dev/sda (O_DIRECT cached, O_DIRECT disk reads): 289.31 MB/sec, 289.31 MB/sec vs. 328.15 MB/sec, 348.75 MB/sec (governor "ondemand": 313.82 MB/sec, 332.86 MB/sec)
  3. if=/dev/zero of=/mnt/sda/tempfile bs=1M count=1024 conv=fdatasync,notrunc (average of five runs, interleaved with 4.): 242 MB/s vs. 343 MB/s (governor "ondemand": 337 MB/s)
  4. echo 3 >/proc/sys/vm/drop_caches; dd if=/mnt/sda/tempfile of=/dev/null bs=1M count=1024 (average of five runs, interleaved with 3.): 234 MB/s vs. 390 MB/s (governor "ondemand": 389 MB/s)
  5. IOzone results:

    Code: Select all

    #### NB these are the values for governor "performance" ##########
    root@odroid01:/mnt/sda# uname -a
    Linux odroid01 4.9.230-96 #1 SMP PREEMPT Fri Aug 21 13:55:00 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
    root@odroid01:/mnt/sda# iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2
            Iozone: Performance Test of File I/O
                    Version $Revision: 3.489 $
                    Compiled for 64 bit mode.
                    Build: linux
    [...]
            Include fsync in write timing
            O_DIRECT feature enabled
            Auto Mode
            File size set to 102400 kB
            Record Size 4 kB
            Record Size 16 kB
            Record Size 512 kB
            Record Size 1024 kB
            Record Size 16384 kB
            Command line used: iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2
            Output is in kBytes/sec
            Time Resolution = 0.000001 seconds.
            Processor cache size set to 1024 kBytes.
            Processor cache line size set to 32 bytes.
            File stride size set to 17 * record size.
                                                                  random    random     bkwd    record    stride
                  kB  reclen    write  rewrite    read    reread    read     write     read   rewrite      read   fwrite frewrite    fread  freread
              102400       4     2774     7434    30530    30221    23910     7387
              102400      16    10613    28916   109136   109186    72925    28557
              102400     512   141156   189980   320977   322189   314189   184661
              102400    1024   205558   257068   330338   331355   330826   257810
              102400   16384   314733   341746   329738   332101   332337   314551
    
    iozone test complete.
    root@odroid01:/mnt/sda#
    

    Code: Select all

    #### NB these are the values for governor "ondemand" ##########
    root@focal-minimal:/mnt/sda# uname -a
    Linux focal-minimal 5.7.0-odroid-arm64 #1 SMP PREEMPT Ubuntu 5.7.14-202008080152~focal (2020-08-07) aarch64 aarch64 aarch64 GNU/Linux
    root@focal-minimal:/mnt/sda# iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2
            Iozone: Performance Test of File I/O
                    Version $Revision: 3.489 $
                    Compiled for 64 bit mode.
                    Build: linux
    [...]
            Include fsync in write timing
            O_DIRECT feature enabled
            Auto Mode
            File size set to 102400 kB
            Record Size 4 kB
            Record Size 16 kB
            Record Size 512 kB
            Record Size 1024 kB
            Record Size 16384 kB
            Command line used: iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2
            Output is in kBytes/sec
            Time Resolution = 0.000001 seconds.
            Processor cache size set to 1024 kBytes.
            Processor cache line size set to 32 bytes.
            File stride size set to 17 * record size.
                                                                  random    random     bkwd    record    stride
                  kB  reclen    write  rewrite    read    reread    read     write     read   rewrite      read   fwrite frewrite    fread  freread
              102400       4    34789    35388    36207    36195    21334    36028
              102400      16    94060   104956   102124   102267    60112   102568
              102400     512   298138   302803   281512   282405   271007   290579
              102400    1024   334057   334282   321801   323074   307411   335072
              102400   16384   358098   373761   371690   373204   354073   373883
    
    iozone test complete.
    root@focal-minimal:/mnt/sda# 
    

    Code: Select all

    #### NB these are the values for governor "performance" ##########
    root@focal-minimal:/mnt/sda# uname -a
    Linux focal-minimal 5.7.0-odroid-arm64 #1 SMP PREEMPT Ubuntu 5.7.14-202008080152~focal (2020-08-07) aarch64 aarch64 aarch64 GNU/Linux
    root@focal-minimal:/mnt/sda# iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2
            Iozone: Performance Test of File I/O
                    Version $Revision: 3.489 $
                    Compiled for 64 bit mode.
                    Build: linux 
    [...]
            Include fsync in write timing
            O_DIRECT feature enabled
            Auto Mode
            File size set to 102400 kB
            Record Size 4 kB
            Record Size 16 kB
            Record Size 512 kB
            Record Size 1024 kB
            Record Size 16384 kB
            Command line used: iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2
            Output is in kBytes/sec
            Time Resolution = 0.000001 seconds.
            Processor cache size set to 1024 kBytes.
            Processor cache line size set to 32 bytes.
            File stride size set to 17 * record size.
                                                                  random    random     bkwd    record    stride                                    
                  kB  reclen    write  rewrite    read    reread    read     write     read   rewrite      read   fwrite frewrite    fread  freread
              102400       4    32157    46719    42461    42505    22829    47047                                                                
              102400      16   106063   114347   111904   111986    64018   115121                                                                
              102400     512   325693   313070   308043   308851   294558   326536                                                                
              102400    1024   348721   334778   339781   341071   323653   350936                                                                
              102400   16384   378186   377819   375614   376962   357228   359546                                                                
    
    iozone test complete.
    root@focal-minimal:/mnt/sda#
    
Last edited by m_ueberall on Thu Aug 27, 2020 2:44 am, edited 2 times in total.
These users thanked the author m_ueberall for the post (total 2):
superpowter77 (Thu Aug 27, 2020 12:28 am) • Truly (Thu Aug 27, 2020 4:27 am)

User avatar
tobetter
Posts: 7754
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 428 times
Been thanked: 1192 times
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by tobetter »

@m_ueberall, Thanks for sharing the test. I am wondering if what CPU frequency and governor have been used when you test them.
These users thanked the author tobetter for the post:
m_ueberall (Thu Aug 27, 2020 12:51 am)

User avatar
m_ueberall
Posts: 39
Joined: Thu Jul 23, 2020 6:13 pm
languages_spoken: english, german
ODROIDs: N2+
Location: Hanau, Germany
Has thanked: 35 times
Been thanked: 17 times
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by m_ueberall »

Truly wrote:
Mon Aug 17, 2020 11:38 pm

Code: Select all

[...]
Aug 17 11:37:19 odroid kernel: [ 1399.271412@4] usb-storage 2-1.3:1.0: USB Mass Storage device detected
Aug 17 11:37:19 odroid kernel: [ 1399.278931@4] usb-storage 2-1.3:1.0: Quirks match for vid 152d pid 0578: 1000000
[...]
Does anyone see anything out of the ordinary?
Is there anything I can do to improve the write speed?
See my previous post--if possible, I'd suggest to rerun all your tests with an image that uses a newer 5.x kernel (you don't need to overwrite the contents of your SSD for this, just use a different boot medium and mount the SSD on /mnt/ssd or the like).
Check for the absence of the above "Quirks match" and whether the output of lsusb -t mentions driver usb-storage or uas (the latter is what you want to see).
Truly wrote:
Mon Aug 17, 2020 11:38 pm
The other issue I have is that N2 will not reboot while having SSD connected. I need to disconnect it, power-off and power-on in order to boot.
I experienced this once during my preliminary tests; in my case, it looked as if the current Petitboot dev.20200816 hung, because it didn't reach the kexec call (disconnecting and reconnecting the drive after a power cycle while already booting a kernel solved this).
(@tobetter: Is this a known problem?)

User avatar
tobetter
Posts: 7754
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 428 times
Been thanked: 1192 times
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by tobetter »

m_ueberall wrote:
Wed Aug 26, 2020 11:36 pm
Truly wrote:
Mon Aug 17, 2020 11:38 pm
The other issue I have is that N2 will not reboot while having SSD connected. I need to disconnect it, power-off and power-on in order to boot.
I experienced this once during my preliminary tests; in my case, it looked as if the current Petitboot dev.20200816 hung, because it didn't reach the kexec call (disconnecting and reconnecting the drive after a power cycle while already booting a kernel solved this).
(@tobetter: Is this a known problem?)
Some user said about the same experience when booting 4.9 kernel without the Petitboot, the problem is resolved after moving the drive to another port far from the DC jack but still a couple of users are still having the problem. I have not clue yet why this happens.
viewtopic.php?p=303824#p303824

What about you? Which port does your disk is attached?

User avatar
m_ueberall
Posts: 39
Joined: Thu Jul 23, 2020 6:13 pm
languages_spoken: english, german
ODROIDs: N2+
Location: Hanau, Germany
Has thanked: 35 times
Been thanked: 17 times
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by m_ueberall »

tobetter wrote:
Wed Aug 26, 2020 11:14 pm
@m_ueberall, Thanks for sharing the test. I am wondering if what CPU frequency and governor have been used when you test them.
I knew I forgot one step when executing the tests, namely ensuring that cpufreq-info showed the same values for both kernels! :oops:
And "of course", the boot image for the 5.7 kernel did not select governor "performance" along with the maximum frequencies. I reran the tests and will update/amend the new results with the output of cpufreq-info in the previous post accordingly tonight. Many thanks for spotting this omission!
These users thanked the author m_ueberall for the post:
tobetter (Thu Aug 27, 2020 12:19 am)

User avatar
m_ueberall
Posts: 39
Joined: Thu Jul 23, 2020 6:13 pm
languages_spoken: english, german
ODROIDs: N2+
Location: Hanau, Germany
Has thanked: 35 times
Been thanked: 17 times
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by m_ueberall »

tobetter wrote:
Wed Aug 26, 2020 11:52 pm
m_ueberall wrote:
Wed Aug 26, 2020 11:36 pm
Truly wrote:
Mon Aug 17, 2020 11:38 pm
The other issue I have is that N2 will not reboot while having SSD connected. I need to disconnect it, power-off and power-on in order to boot.
I experienced this once during my preliminary tests; in my case, it looked as if the current Petitboot dev.20200816 hung, because it didn't reach the kexec call (disconnecting and reconnecting the drive after a power cycle while already booting a kernel solved this).
(@tobetter: Is this a known problem?)
Some user said about the same experience when booting 4.9 kernel without the Petitboot, the problem is resolved after moving the drive to another port far from the DC jack but still a couple of users are still having the problem. I have not clue yet why this happens.
viewtopic.php?p=303824#p303824

What about you? Which port does your disk is attached?
I did indeed use the port next to the DC jack first (when I experienced the problem) and moved away from it afterwards. With respect to the image shown in this post, I moved from the upper right to the upper left socket (as seen from the front, maximizing the distance between both the DC jack and the HDMI cable).

Truly
Posts: 30
Joined: Sun Nov 03, 2019 8:53 am
languages_spoken: english
ODROIDs: N2
Has thanked: 19 times
Been thanked: 1 time
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by Truly »

m_ueberall wrote:
Wed Aug 26, 2020 11:36 pm
Truly wrote:
Mon Aug 17, 2020 11:38 pm

Code: Select all

[...]
Aug 17 11:37:19 odroid kernel: [ 1399.271412@4] usb-storage 2-1.3:1.0: USB Mass Storage device detected
Aug 17 11:37:19 odroid kernel: [ 1399.278931@4] usb-storage 2-1.3:1.0: Quirks match for vid 152d pid 0578: 1000000
[...]
Does anyone see anything out of the ordinary?
Is there anything I can do to improve the write speed?
See my previous post--if possible, I'd suggest to rerun all your tests with an image that uses a newer 5.x kernel (you don't need to overwrite the contents of your SSD for this, just use a different boot medium and mount the SSD on /mnt/ssd or the like).
Check for the absence of the above "Quirks match" and whether the output of lsusb -t mentions driver usb-storage or uas (the latter is what you want to see).
Truly wrote:
Mon Aug 17, 2020 11:38 pm
The other issue I have is that N2 will not reboot while having SSD connected. I need to disconnect it, power-off and power-on in order to boot.
I experienced this once during my preliminary tests; in my case, it looked as if the current Petitboot dev.20200816 hung, because it didn't reach the kexec call (disconnecting and reconnecting the drive after a power cycle while already booting a kernel solved this).
(@tobetter: Is this a known problem?)
With the firmware update for the USB3.0 to SATA adapter, I've managed to resolve the performance issue and I'm quite satisfied with the results considering it is using usb-storage driver:

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
        |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
        |__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 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
However, I'm now curious to see what kind of performance can I get with the 5.x kernel, so I'll do the tests as soon as I'm able and report back the results.
I'm not sure if there will be any difference as I don't know if the adapter supports UAS.

The reboot issue was resolved by replugging the SSD from bottom left to upper right USB slot. In other words, both HDD and SSD are plugged in the 2 slots farther from the DC plug.

Truly
Posts: 30
Joined: Sun Nov 03, 2019 8:53 am
languages_spoken: english
ODROIDs: N2
Has thanked: 19 times
Been thanked: 1 time
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by Truly »

Here are the results with 5.7.14 kernel:

Code: Select all

uname -a
Linux focal-minimal 5.7.0-odroid-arm64 #1 SMP PREEMPT Ubuntu 5.7.14-202008080152~focal (2020-08-07) aarch64 aarch64 aarch64 GNU/Linux
  1. Write DD test

    Code: Select all

    dd if=/dev/zero of=test oflag=direct bs=4M count=256
    256+0 records in
    256+0 records out
    1073741824 bytes (1.1 GB, 1.0 GiB) copied, 3.32398 s, 323 MB/s
  2. Read DD test

    Code: Select all

    dd if=test of=/dev/null iflag=direct bs=4M
    256+0 records in
    256+0 records out
    1073741824 bytes (1.1 GB, 1.0 GiB) copied, 2.94223 s, 365 MB/s
  3. IOzone

    Code: Select all

    iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2
    		Iozone: Performance Test of File I/O
                    Version $Revision: 3.489 $
                    Compiled for 64 bit mode.
                    Build: linux
    
            Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins
                         Al Slater, Scott Rhine, Mike Wisner, Ken Goss
                         Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
                         Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,
                         Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone,
                         Erik Habbinga, Kris Strecker, Walter Wong, Joshua Root,
                         Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren Sawyer,
                         Vangel Bojaxhi, Ben England, Vikentsi Lapa,
                         Alexey Skidanov, Sudhir Kumar.
    
            Run began: Fri Aug 28 20:09:49 2020
    
            Include fsync in write timing
            O_DIRECT feature enabled
            Auto Mode
            File size set to 102400 kB
            Record Size 4 kB
            Record Size 16 kB
            Record Size 512 kB
            Record Size 1024 kB
            Record Size 16384 kB
            Command line used: iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2
            Output is in kBytes/sec
            Time Resolution = 0.000001 seconds.
            Processor cache size set to 1024 kBytes.
            Processor cache line size set to 32 bytes.
            File stride size set to 17 * record size.
                                                                  random    random     bkwd    record    stride
                  kB  reclen    write  rewrite    read    reread    read     write     read   rewrite      read   fwrite frewrite    fread  freread
              102400       4    30645    37017    37003    37094    26575    36987
              102400      16    84774    95854   114653   114900    85287    95765
              102400     512   286011   289848   271022   272158   259748   290034
              102400    1024   319185   319168   312509   313775   293886   316236
              102400   16384   362586   361674   367666   369751   367359   361130
    
    iozone test complete.
  4. hdparm

    Code: Select all

    sudo hdparm -Tt /dev/sdb
    
    /dev/sdb:
     Timing cached reads:   4240 MB in  2.00 seconds = 2120.28 MB/sec
     Timing buffered disk reads: 1114 MB in  3.00 seconds = 370.87 MB/sec
UAS is used instead of USB driver - /etc/var/syslog:

Code: Select all

Apr  1 17:24:11 focal-minimal kernel: [   31.709593] USB_PWR_EN: disabling
Apr  1 17:24:15 focal-minimal kernel: [   35.817581] sd 1:0:0:0: tag#16 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
Apr  1 17:24:15 focal-minimal kernel: [   35.817593] sd 1:0:0:0: tag#16 CDB: opcode=0x9e, sa=0x10 9e 10 00 00 00 00 00 00 00 00 00 00 00 20 00 00
Apr  1 17:24:15 focal-minimal kernel: [   35.837587] scsi host1: uas_eh_device_reset_handler start
Apr  1 17:24:15 focal-minimal kernel: [   35.917936] usb 2-1.2: reset SuperSpeed Gen 1 USB device number 4 using xhci-hcd
Apr  1 17:24:15 focal-minimal kernel: [   35.939791] scsi host1: uas_eh_device_reset_handler success
Apr  1 17:24:15 focal-minimal kernel: [   35.950554] sd 1:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
Apr  1 17:24:15 focal-minimal kernel: [   35.950561] sd 1:0:0:0: [sdb] 4096-byte physical blocks
Apr  1 17:24:15 focal-minimal kernel: [   35.950752] sd 1:0:0:0: [sdb] Write Protect is off
Apr  1 17:24:15 focal-minimal kernel: [   35.950762] sd 1:0:0:0: [sdb] Mode Sense: 53 00 00 08
Apr  1 17:24:15 focal-minimal kernel: [   35.951114] sd 1:0:0:0: [sdb] Disabling FUA
Apr  1 17:24:15 focal-minimal kernel: [   35.951121] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Apr  1 17:24:15 focal-minimal kernel: [   35.951469] sd 1:0:0:0: [sdb] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
Apr  1 17:24:15 focal-minimal kernel: [   35.977846]  sdb: sdb1
Apr  1 17:24:15 focal-minimal kernel: [   35.980255] sd 1:0:0:0: [sdb] Attached SCSI disk
Overall significantly higher performance compared to 4.9.230 kernel.
When can we expect 5.x kernel from HK? :D

P.S.
Reboot issue is back on this kernel version, although both devices are plugged in the same as before - away from the DC plug.

thudchimp
Posts: 9
Joined: Mon Sep 02, 2019 8:25 am
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by thudchimp »

It's not just adapters, but USB cables. I have a dual drive dock I was convinced was only usb 2. I got a new cable (Amazon Basics usb a to usb c) and it suddenly began running faster than usb 2 speeds. A different powered, single drive dock would disconnect constantly until I changed which port it was plugged into. A usb-powered enclosure with an ssd inside would only run at usb 2 speeds until I used the same cable that worked for the other drive dock and then it went 6x faster.

Most of these things are not problems on any other computers. Except for one cable that came with a dock, all the things going slow or disconnecting on the n2 worked just fine on all my other devices.

Just leaving this out there in case someone else reads it. Try different cables and ports on on the n2 because it seems to be very finicky about creating a high speed connection.
These users thanked the author thudchimp for the post (total 2):
m_ueberall (Tue Mar 23, 2021 3:16 pm) • Truly (Tue Mar 23, 2021 4:41 pm)

User avatar
m_ueberall
Posts: 39
Joined: Thu Jul 23, 2020 6:13 pm
languages_spoken: english, german
ODROIDs: N2+
Location: Hanau, Germany
Has thanked: 35 times
Been thanked: 17 times
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by m_ueberall »

superpowter77 wrote:
Wed Aug 05, 2020 2:57 pm
We should make a list of working USB3 to SATA adapters/caddy's.
Update: For two ODROID N2+ SBCs, I successfully tested the following adapters in conjunction with Crucial MX500 2.5" SSDs (using Linux kernel 5.10.x):
  • StarTech USB3S2SAT3CB ('USB 3.0 to 2.5" SATA HDD/SDD Cable w/UASP'); length: 1.64 ft

    Code: Select all

    ID 174c:55aa ASMedia Technology Inc. Name: ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge
    Product: ASM105x; Manufacturer: ASMT
    scsi host0: uas; scsi 0:0:0:0: Direct-Access     ASMT     ASM105x          0    PQ: 0 ANSI: 6
    
  • JSAUX NZUATSA (JSDENZUA2SAGY1P) [no product description found on their homepage] ('SATA to USB 3.0 Cable'); length: 0.7 ft

    Code: Select all

    ID 174c:55aa ASMedia Technology Inc. Name: ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge
    Product: ASM1153EUSB3.0TOSATA; Manufacturer: ASM1153EUSB3.0TOSATA
    scsi host0: uas; scsi 0:0:0:0: Direct-Access     ASMT     2115             0    PQ: 0 ANSI: 6
    
Please note that the ASMedia controller requires kernel command-line option rootdelay=40 because the attached device will only show up after some 30 seconds following a USB rescan/reset. (If your root is on ZFS, this might help.)
These users thanked the author m_ueberall for the post (total 3):
tobetter (Fri Apr 23, 2021 4:24 pm) • odroid (Fri Apr 23, 2021 4:40 pm) • superpowter77 (Tue Apr 27, 2021 5:36 am)

User avatar
tobetter
Posts: 7754
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 428 times
Been thanked: 1192 times
Contact:

Re: N2/N2Plus/C4 are extremely picky on USB3 to SATA adapters.

Post by tobetter »

m_ueberall wrote:
Fri Apr 23, 2021 3:50 pm
Please note that the ASMedia controller requires kernel command-line option rootdelay=40 because the attached device will only show up after some 30 seconds following a USB rescan/reset. (If your root is on ZFS, this might help.)
This looks very prompting note...thanks. :)

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 0 guests