PINE64
Rock64 crash randomly during usb 3 copy with RAID1 drive - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=85)
+--- Forum: Linux on Rock64 (https://forum.pine64.org/forumdisplay.php?fid=88)
+--- Thread: Rock64 crash randomly during usb 3 copy with RAID1 drive (/showthread.php?tid=5137)

Pages: 1 2 3


RE: Rock64 crash randomly during usb 3 copy with RAID1 drive - rontant - 09-17-2017

Alright, I have tested the new Orico USB3.1 type C enclosure on my other SBC, Odroid XU4 (running Arch Linux Arm 4.9.5x) and it turned out to be facing the same problem. So it seems to confirm my suspicion that this is an upstream Linux issue.

The good news is that simply disabling UAS for both Rock64 and Odroid XU4 make the problem disappear. UAS is great but until a viable option is available to make UAS stable, I will just continue to use this USB3.1 enclosure with UAS disabled.

By the way, don't be afraid to use USB3.0 hub but make sure it is a powered hub. If you plan to use more than two disks, get one with a PSU of at least 12V.


RE: Rock64 crash randomly during usb 3 copy with RAID1 drive - digitaldaz - 09-19-2017

My board is crashing like crazy with an SSD, no RAID. That said, I am not using a powered USB, just a USB to SATA. I have a 3A PSU on this I thought that would be good for it. I'm wondering whether it could be the UAS thing, it is definitely using the UAS.

Either way, no great concern right now. I'm loving the blazing speeds I'm getting though Smile

Actually, how do you blacklist the UAS??


RE: Rock64 crash randomly during usb 3 copy with RAID1 drive - rontant - 09-19-2017

(09-19-2017, 02:26 AM)digitaldaz Wrote: Actually, how do you blacklist the UAS??

First, check if your USB enclosure is indeed a UAS enabled USB 3 enclosure. Use the command:

Code:
lsusb -t

Do you see your device listed as one using uas driver?

If yes, get the vendor ID and the product ID . Just use the command  line 'lsusb' without any parameter and you will see a list of USB devices with their respective ID numbers. Your USB enclosure should be one of them. If you use WD Passport 3TB, for example, you will see something like this:

Bus 005 Device 003: ID 1058:0827 Western Digital Technologies, Inc.

1058 is the vendor ID and 0827 the product ID.

Add these 2 numbers into the conf file in /etc/modprobe.d to blacklist the UAS

Code:
sudo nano /etc/modprobe.d/rk3328-usb-storage-quirks.conf

The ID numbers should be following the format 0xVendorID:0xProductID:u. Each blacklisted device should be separated by a comma. See the example below.  

options usb-storage quirks=0x2537:0x1066:u,0x2537:0x1068:u,0x0bc2:0xa013:u,0x1058:0x0827:u,0x0bc2:0x2101:u,0x2109:0x0715:u


Reboot twice. 
Run 'dmesg' to verify. If you edit correctly, you should see a line in dmesg saying your device has been blacklisted. If you run "lsusb -t" again, it should say "driver=usb-storage" instead of "driver=uas"

A BIG CAVEAT: Do this at your own risk.


RE: Rock64 crash randomly during usb 3 copy with RAID1 drive - digitaldaz - 09-19-2017

(09-19-2017, 05:46 AM)rontant Wrote:
(09-19-2017, 02:26 AM)digitaldaz Wrote: Actually, how do you blacklist the UAS??

First, check if your USB enclosure is indeed a UAS enabled USB 3 enclosure. Use the command:

Code:
lsusb -t

Do you see your device listed as one using uas driver?

If yes, get the vendor ID and the product ID . Just use the command  line 'lsusb' without any parameter and you will see a list of USB devices with their respective ID numbers. Your USB enclosure should be one of them. If you use WD Passport 3TB, for example, you will see something like this:

Bus 005 Device 003: ID 1058:0827 Western Digital Technologies, Inc.

1058 is the vendor ID and 0827 the product ID.

Add these 2 numbers into the conf file in /etc/modprobe.d to blacklist the UAS

Code:
sudo nano /etc/modprobe.d/rk3328-usb-storage-quirks.conf

The ID numbers should be following the format 0xVendorID:0xProductID:u. Each blacklisted device should be separated by a comma. See the example below.  

options usb-storage quirks=0x2537:0x1066:u,0x2537:0x1068:u,0x0bc2:0xa013:u,0x1058:0x0827:u,0x0bc2:0x2101:u,0x2109:0x0715:u


Reboot twice. 
Run 'dmesg' to verify.  If you edit correctly, you should see a line in dmesg saying your device has been blacklisted. If you run "lsusb -t" again,  it should say "driver=usb-storage"  instead of "driver=uas"

A BIG CAVEAT: Do this at your own risk.

I'd actually worked it all out, the real key to this and I haven't a clue why is the "Reboot twice. " I had only rebooted once, thanks!


RE: Rock64 crash randomly during usb 3 copy with RAID1 drive - stuartiannaylor - 09-19-2017

https://linux.die.net/man/1/usb-devices

Gives some pretty good info


RE: Rock64 crash randomly during usb 3 copy with RAID1 drive - rontant - 09-23-2017

(09-19-2017, 08:00 AM)digitaldaz Wrote: I'd actually worked it all out, the real key to this and I haven't a clue why is the "Reboot twice. " I had only rebooted once, thanks!

Well, good for  you then. With my Orico USB3.1 type C, it requires two reboots for the blacklisting to take effect. Thank you.


RE: Rock64 crash randomly during usb 3 copy with RAID1 drive - digitaldaz - 09-23-2017

(09-23-2017, 02:53 AM)rontant Wrote:
(09-19-2017, 08:00 AM)digitaldaz Wrote: I'd actually worked it all out, the real key to this and I haven't a clue why is the "Reboot twice. " I had only rebooted once, thanks!

Well, good for  you then. With my Orico USB3.1 type C, it requires two reboots for the blacklisting to take effect. Thank you.


I hadn't worked out the two reboots, I was still sat broken until your post Smile

Incidently, I have now got five nodes with LXD on them, none have crashed since I used this method provided by rontant and have now got / on SSD.


RE: Rock64 crash randomly during usb 3 copy with RAID1 drive - ayufan - 09-24-2017

Could anyone add these storage quirks to my repo to be included with next build? https://github.com/ayufan-rock64/linux-build/tree/master/package/root/etc/modprobe.d


RE: Rock64 crash randomly during usb 3 copy with RAID1 drive - tomtomtom - 11-06-2017

Hello digitaldaz
Tk's very very much.
You solve the problem.
i use a USB 3.1 Drive and an USB 2 frive on the ROCK64.
When i use Transmission, for torrent, then after few seconds, Transmission fails, no connection, and i have no access to the web interface.

i use your method pn the usb 3.1 device,

Code:
lsusb -t

and

Code:
sudo nano /etc/modprobe.d/rk3328-usb-storage-quirks.conf


and reboot twice.

and the miracle happends. 1 hour later, still working great.
many tk's again Cool

I hope the next update of OMV will correct this problem.


RE: Rock64 crash randomly during usb 3 copy with RAID1 drive - digitaldaz - 11-06-2017

@totomtom, credit to rontant for this, it was him that provided me the fix. I have weeks of uptime now, five rock64, none have crashed since.