USB SSD Issues

Post Reply
Twinstar1337
Posts: 8
Joined: Mon Mar 25, 2019 11:04 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 1 time
Contact:

USB SSD Issues

Unread post by Twinstar1337 » Fri Jan 17, 2020 5:31 am

Hey there,

i am running Armbian buster with Linux 5.4.6-meson64. I use the latest NextCloudPi installation for my Nextcloud deployment.

I upgraded from a RaspberryPi B3+ because, performance was really bad. More than one user and it was painfully slow and transfer rates @ about 4-6mb/s.
Never the less it worked for 2 Years, with no data loss.

I picked Odroid as upgrade, but i can not get it to work properly.

I get lots of I/O Erros while writing data to the USB drive its a 2TB Crucial MX500 SSD, connected with an USB 3.0 to SATA adapter. On my Ubuntu Desktop i get about 300mb/s read/write speeds. Which is not bad for USB3.0 and the max SATA limit of 525mb/s for this drive.

But connecting the SSD to the Odroid via USB just does not work. I get speed up to 40mb/s but Nextcloud crashes all the time, with erros like:
Your data directory is invalid.

Make sure that a ".ocdata" file exists in the root directory of the data directory.

Can't create the "data" directory

This can usually be remedied by granting the web server write access to the root directory. See also https://docs.nextcloud.com/server/17/go ... ermissions
Is there anything i can do?

best regards

User avatar
tobetter
Posts: 4671
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: 88 times
Been thanked: 338 times
Contact:

Re: USB SSD Issues

Unread post by tobetter » Fri Jan 17, 2020 8:19 am

Can you try with the image from here for testing if USB works without an issue? The image also has the kernel v5.4.6 with USB 3.0 patch for ODROID-N2 but not sure if the Armbian kernel has it or not. Once you have tested the USB performance, you can decide which OS or kernel you will use.
http://ppa.linuxfactory.or.kr/images/raw/arm64/disco/

Twinstar1337
Posts: 8
Joined: Mon Mar 25, 2019 11:04 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: USB SSD Issues

Unread post by Twinstar1337 » Fri Jan 17, 2020 9:51 pm

tobetter wrote:
Fri Jan 17, 2020 8:19 am
Once you have tested the USB performance, you can decide which OS or kernel you will use.
http://ppa.linuxfactory.or.kr/images/raw/arm64/disco/
Thanks for the quick reply!
How can i reliable test USB3.0 performance on the Odroid?

User avatar
igorpec
Posts: 499
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+
Has thanked: 19 times
Been thanked: 50 times
Contact:

Re: USB SSD Issues

Unread post by igorpec » Sat Jan 18, 2020 1:08 am

tobetter wrote:
Fri Jan 17, 2020 8:19 am
Can you try with the image from here for testing if USB works without an issue? The image also has the kernel v5.4.6 with USB 3.0 patch for ODROID-N2 but not sure if the Armbian kernel has it or not. Once you have tested the USB performance, you can decide which OS or kernel you will use.
http://ppa.linuxfactory.or.kr/images/raw/arm64/disco/
I am glad to fix this problem if you can point out to the kernel sources. We have many patches but its hard to fix everything at once :)
ARMBIAN - follow on Twitter
linux for ARM development boards with user friendly development tools

User avatar
tobetter
Posts: 4671
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: 88 times
Been thanked: 338 times
Contact:

Re: USB SSD Issues

Unread post by tobetter » Sat Jan 18, 2020 1:21 am

igorpec wrote:
Sat Jan 18, 2020 1:08 am
tobetter wrote:
Fri Jan 17, 2020 8:19 am
Can you try with the image from here for testing if USB works without an issue? The image also has the kernel v5.4.6 with USB 3.0 patch for ODROID-N2 but not sure if the Armbian kernel has it or not. Once you have tested the USB performance, you can decide which OS or kernel you will use.
http://ppa.linuxfactory.or.kr/images/raw/arm64/disco/
I am glad to fix this problem if you can point out to the kernel sources. We have many patches but its hard to fix everything at once :)
I think you can merge these patches from Neil Armstrong, which have been upstreamed from Linux kernel 4.9.y.
https://github.com/tobetter/linux/commi ... 2e02065055
https://github.com/tobetter/linux/commi ... 0f4fb06f62
https://github.com/tobetter/linux/commi ... f6e67ab323

Twinstar1337
Posts: 8
Joined: Mon Mar 25, 2019 11:04 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: USB SSD Issues

Unread post by Twinstar1337 » Thu Jan 30, 2020 9:54 am

tobetter wrote:
Fri Jan 17, 2020 8:19 am
Can you try with the image from here for testing if USB works without an issue? The image also has the kernel v5.4.6 with USB 3.0 patch for ODROID-N2 but not sure if the Armbian kernel has it or not. Once you have tested the USB performance, you can decide which OS or kernel you will use.
http://ppa.linuxfactory.or.kr/images/raw/arm64/disco/

Etched the Image to my micro SD, but i can not login via ssh, is there any tutorial page?

User avatar
tobetter
Posts: 4671
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: 88 times
Been thanked: 338 times
Contact:

Re: USB SSD Issues

Unread post by tobetter » Thu Jan 30, 2020 10:05 am

Twinstar1337 wrote:
tobetter wrote:
Fri Jan 17, 2020 8:19 am
Can you try with the image from here for testing if USB works without an issue? The image also has the kernel v5.4.6 with USB 3.0 patch for ODROID-N2 but not sure if the Armbian kernel has it or not. Once you have tested the USB performance, you can decide which OS or kernel you will use.
http://ppa.linuxfactory.or.kr/images/raw/arm64/disco/

Etched the Image to my micro SD, but i can not login via ssh, is there any tutorial page?
If the blue LED is blinking but you cannot login, probably N2 failed to get IP address or sshd is not running. Can you check with HDMI display or USB-to-serial port?

"Tapatalk wishes you to have fun with ODROID"


joshua.yang
Posts: 355
Joined: Fri Sep 22, 2017 5:54 pm
languages_spoken: Korean, English
ODROIDs: XU4, XU4Q + Cloudshell2, H2, N2
Has thanked: 12 times
Been thanked: 66 times
Contact:

Re: USB SSD Issues

Unread post by joshua.yang » Thu Jan 30, 2020 10:11 am

BTY, I recommend you disable the UAS feature of your USB-SSD bridge if it is enabled by default. If you have trouble with it. Sometimes UAS is not working properly.

Enter the following commands to check if that feature is enabled. Check the "Bus 04 -> Port 1 -> Dev 3" device that using "uas" driver. Then you should disable this so that makes it use "usb-storage" driver.
This result from CloudShell 2 with XU4, but it is really similar to the N2's.

Code: Select all

root@odroid:~# lsusb -t
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
        |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M

Twinstar1337
Posts: 8
Joined: Mon Mar 25, 2019 11:04 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: USB SSD Issues

Unread post by Twinstar1337 » Thu Jan 30, 2020 11:06 am

tobetter wrote:
Thu Jan 30, 2020 10:05 am
Twinstar1337 wrote: Etched the Image to my micro SD, but i can not login via ssh, is there any tutorial page?
If the blue LED is blinking but you cannot login, probably N2 failed to get IP address or sshd is not running. Can you check with HDMI display or USB-to-serial port?

"Tapatalk wishes you to have fun with ODROID"
I can see the login ssh, but login root and password 1234 or odroid, does not work for first time login.

Twinstar1337
Posts: 8
Joined: Mon Mar 25, 2019 11:04 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: USB SSD Issues

Unread post by Twinstar1337 » Thu Jan 30, 2020 11:23 am

joshua.yang wrote:
Thu Jan 30, 2020 10:11 am
BTY, I recommend you disable the UAS feature of your USB-SSD bridge if it is enabled by default. If you have trouble with it. Sometimes UAS is not working properly.

Enter the following commands to check if that feature is enabled. Check the "Bus 04 -> Port 1 -> Dev 3" device that using "uas" driver. Then you should disable this so that makes it use "usb-storage" driver.
This result from CloudShell 2 with XU4, but it is really similar to the N2's.

Code: Select all

root@odroid:~# lsusb -t
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
        |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M
I upgraded to Armbian buster with Linux 5.4.14-meson64, but still same error.

Code: Select all

root@odroidn2:~# 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 1: Dev 15, If 0, Class=Mass Storage, Driver=usb-storage, 480M
Testing with dd, results in a very bad experience:
root@odroidn2:/media/SSD# dd if=/dev/zero of=./largefile bs=1M count=4000
2517630976 bytes (2.5 GB, 2.3 GiB) copied, 123.024 s, 10.5 MB/s
Watching the copy process with nmon shows, that the transfer speed drops to 0MB/s

joshua.yang
Posts: 355
Joined: Fri Sep 22, 2017 5:54 pm
languages_spoken: Korean, English
ODROIDs: XU4, XU4Q + Cloudshell2, H2, N2
Has thanked: 12 times
Been thanked: 66 times
Contact:

Re: USB SSD Issues

Unread post by joshua.yang » Fri Jan 31, 2020 11:13 am

I wonder why it attached as USB 2.0 mode. What SSD, USB-SSD bridge model you use?

Twinstar1337
Posts: 8
Joined: Mon Mar 25, 2019 11:04 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: USB SSD Issues

Unread post by Twinstar1337 » Wed Feb 19, 2020 6:47 am

joshua.yang wrote:
Fri Jan 31, 2020 11:13 am
I wonder why it attached as USB 2.0 mode. What SSD, USB-SSD bridge model you use?
I use this Model, wich works just fine @ my Ubuntu Desktop:
USB 3.0 To 2.5" SATA III Hard Drive Adapter Cable/UASP -SATA To USB3.0 Converter Usb C To Hdmi Vga Usb C Adapter
https://a.aliexpress.com/_UogfY

User avatar
odroid
Site Admin
Posts: 33686
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 511 times
Been thanked: 506 times
Contact:

Re: USB SSD Issues

Unread post by odroid » Wed Feb 19, 2020 11:15 am

You might need to compare "dmesg" outputs between your Ubuntu PC and ODROID to narrow down root causes.

Twinstar1337
Posts: 8
Joined: Mon Mar 25, 2019 11:04 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: USB SSD Issues

Unread post by Twinstar1337 » Tue Mar 17, 2020 8:42 am

Last Update:
dmesg spit out a bunch of btrfs errors. So i decided to whipe the system, used ext4 and also i did not use NCP this time, just vanilla nextcloud installed via SNAP.
BOOOM works flawless now, 226 MB/s transfer speed.

Just took me half a year to figure out lol
Thanks to all who helped!
These users thanked the author Twinstar1337 for the post:
odroid (Tue Mar 17, 2020 11:33 am)

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 3 guests