jandie1505
Posts: 1
Joined: Sat Nov 25, 2023 11:55 am

Raspberry Pi 5 USB Port breaks until reboot when creating a RAID array

Sat Nov 25, 2023 12:05 pm

I attempted to create a RAID 1 array with two 5 TB hard drives and a powered USB hub on my Raspberry Pi 5.

So I started creating a partition table with parted, creating the partitions with fdisk and then I started the mdadm RAID array with sudo mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sda1 /dev/sdb1.

After I started the RAID array, and it is shown in lsblk:

Code: Select all

NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
loop0         7:0    0  68.5M  1 loop  /snap/core22/867
                                       /snap/core22/867
loop1         7:1    0   169M  1 loop  /snap/lxd/25953
                                       /snap/lxd/25953
loop2         7:2    0 134.8M  1 loop  /snap/lxd/26096
                                       /snap/lxd/26096
loop3         7:3    0  35.5M  1 loop  /snap/snapd/20298
                                       /snap/snapd/20298
sda           8:0    0   4.5T  0 disk  
└─sda1        8:1    0   4.5T  0 part  
  └─md0       9:0    0   4.5T  0 raid1 
sdb           8:16   0   4.5T  0 disk  
└─sdb1        8:17   0   4.5T  0 part  
  └─md0       9:0    0   4.5T  0 raid1 
mmcblk0     179:0    0  59.5G  0 disk  
├─mmcblk0p1 179:1    0   512M  0 part  /boot/firmware
└─mmcblk0p2 179:2    0    59G  0 part  /snap
                                       /
But a few seconds later, both hard drives are completely gone in lsblk:

Code: Select all

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0  68.5M  1 loop /snap/core22/867
                                      /snap/core22/867
loop1         7:1    0   169M  1 loop /snap/lxd/25953
                                      /snap/lxd/25953
loop2         7:2    0 134.8M  1 loop /snap/lxd/26096
                                      /snap/lxd/26096
loop3         7:3    0  35.5M  1 loop /snap/snapd/20298
                                      /snap/snapd/20298
mmcblk0     179:0    0  59.5G  0 disk 
├─mmcblk0p1 179:1    0   512M  0 part /boot/firmware
└─mmcblk0p2 179:2    0    59G  0 part /snap
                                      /
In the kernel log I can see that the USB devices have been disconnected:

Code: Select all

[    0.920761] usbcore: registered new interface driver usbfs
[    0.926276] usbcore: registered new interface driver hub
[    0.931621] usbcore: registered new device driver usb
[    1.347331] usbcore: registered new interface driver lan78xx
[    1.353032] usbcore: registered new interface driver smsc95xx
[    2.740843] xhci-hcd xhci-hcd.0: new USB bus registered, assigned bus number 1
[    2.768524] xhci-hcd xhci-hcd.0: new USB bus registered, assigned bus number 2
[    2.775785] xhci-hcd xhci-hcd.0: Host supports USB 3.0 SuperSpeed
[    2.781951] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.05
[    2.790257] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.797509] usb usb1: Product: xHCI Host Controller
[    2.802406] usb usb1: Manufacturer: Linux 6.5.0-1006-raspi xhci-hcd
[    2.808697] usb usb1: SerialNumber: xhci-hcd.0
[    2.813298] hub 1-0:1.0: USB hub found
[    2.821256] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.05
[    2.829561] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.836812] usb usb2: Product: xHCI Host Controller
[    2.841712] usb usb2: Manufacturer: Linux 6.5.0-1006-raspi xhci-hcd
[    2.848003] usb usb2: SerialNumber: xhci-hcd.0
[    2.852566] hub 2-0:1.0: USB hub found
[    2.865474] xhci-hcd xhci-hcd.1: new USB bus registered, assigned bus number 3
[    2.893078] xhci-hcd xhci-hcd.1: new USB bus registered, assigned bus number 4
[    2.900333] xhci-hcd xhci-hcd.1: Host supports USB 3.0 SuperSpeed
[    2.906489] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.05
[    2.914788] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.922039] usb usb3: Product: xHCI Host Controller
[    2.926933] usb usb3: Manufacturer: Linux 6.5.0-1006-raspi xhci-hcd
[    2.933227] usb usb3: SerialNumber: xhci-hcd.1
[    2.937790] hub 3-0:1.0: USB hub found
[    2.945743] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.05
[    2.954045] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.961300] usb usb4: Product: xHCI Host Controller
[    2.966196] usb usb4: Manufacturer: Linux 6.5.0-1006-raspi xhci-hcd
[    2.972490] usb usb4: SerialNumber: xhci-hcd.1
[    2.977046] hub 4-0:1.0: USB hub found
[    3.197661] usb 3-1: new high-speed USB device number 2 using xhci-hcd
[    3.352334] usb 3-1: New USB device found, idVendor=2109, idProduct=2817, bcdDevice=90.33
[    3.360561] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.367749] usb 3-1: Product: USB2.0 Hub             
[    3.372826] usb 3-1: Manufacturer: VIA Labs, Inc.         
[    3.486051] hub 3-1:1.0: USB hub found
[    3.546632] usb 4-1: new SuperSpeed USB device number 2 using xhci-hcd
[    3.719411] usb 4-1: New USB device found, idVendor=2109, idProduct=0817, bcdDevice=90.33
[    3.727630] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.734793] usb 4-1: Product: USB3.0 Hub             
[    3.739862] usb 4-1: Manufacturer: VIA Labs, Inc.         
[    3.802727] hub 4-1:1.0: USB hub found
[    4.369734] usb 4-1.1: new SuperSpeed USB device number 3 using xhci-hcd
[    4.394792] usb 4-1.1: New USB device found, idVendor=1058, idProduct=2627, bcdDevice=40.10
[    4.403308] usb 4-1.1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[    4.410713] usb 4-1.1: Product: My Passport 2627
[    4.415349] usb 4-1.1: Manufacturer: Western Digital
[    4.420332] usb 4-1.1: SerialNumber: 575836324442314553314655
[    4.505715] usb 4-1.4: new SuperSpeed USB device number 4 using xhci-hcd
[    4.530641] usb 4-1.4: New USB device found, idVendor=1058, idProduct=2627, bcdDevice=40.10
[    4.539054] usb 4-1.4: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[    4.546407] usb 4-1.4: Product: My Passport 2627
[    4.551045] usb 4-1.4: Manufacturer: Western Digital
[    4.556031] usb 4-1.4: SerialNumber: 575843324441314B5A583546
[    6.286449] usbcore: registered new device driver onboard-usb-hub
[    6.305551] usb-storage 4-1.1:1.0: USB Mass Storage device detected
[    6.312397] scsi host0: usb-storage 4-1.1:1.0
[    6.322402] usb-storage 4-1.4:1.0: USB Mass Storage device detected
[    6.343469] scsi host1: usb-storage 4-1.4:1.0
[    6.343639] usbcore: registered new interface driver usb-storage
[    6.352098] usbcore: registered new interface driver uas
[    6.370895] usbcore: registered new interface driver brcmfmac
[    6.650920] hub 3-1:1.0: USB hub found
[    6.837492] usb 4-1.1: USB disconnect, device number 3
[    6.906995] hub 3-1:1.0: USB hub found
[    6.938733] usb 4-1.4: USB disconnect, device number 4
[    7.226945] hub 4-1:1.0: USB hub found
[    7.322953] hub 4-1:1.0: USB hub found
[    7.877744] usb 4-1.1: new SuperSpeed USB device number 5 using xhci-hcd
[    7.898659] usb 4-1.1: New USB device found, idVendor=1058, idProduct=2627, bcdDevice=40.10
[    7.898671] usb 4-1.1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[    7.898675] usb 4-1.1: Product: My Passport 2627
[    7.898679] usb 4-1.1: Manufacturer: Western Digital
[    7.898682] usb 4-1.1: SerialNumber: 575836324442314553314655
[    7.899623] usb-storage 4-1.1:1.0: USB Mass Storage device detected
[    7.899822] scsi host0: usb-storage 4-1.1:1.0
[    7.977760] usb 4-1.4: new SuperSpeed USB device number 6 using xhci-hcd
[    7.998824] usb 4-1.4: New USB device found, idVendor=1058, idProduct=2627, bcdDevice=40.10
[    7.998833] usb 4-1.4: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[    7.998838] usb 4-1.4: Product: My Passport 2627
[    7.998842] usb 4-1.4: Manufacturer: Western Digital
[    7.998845] usb 4-1.4: SerialNumber: 575843324441314B5A583546
[    7.999878] usb-storage 4-1.4:1.0: USB Mass Storage device detected
[    8.000113] scsi host1: usb-storage 4-1.4:1.0
[21539.435402] usb 3-1: USB disconnect, device number 2
[21539.435911] usb 4-1: USB disconnect, device number 2
[21539.435918] usb 4-1.1: USB disconnect, device number 5
[21539.503302] usb 4-1.4: USB disconnect, device number 6
I also reinstalled the OS on the Pi 5 multiple times, and tried both Ubuntu Server 23.10 and Raspberry Pi OS (Bookworm), I had always the same issue.

When this bug happens, the USB port on the Raspberry Pi is also completely broken until I reboot the system. That means that when I unplug the usb hub and plug it back in, nothing happens. When I plug in any other device to this usb port, also nothing happens. Other usb ports are still working. When I reboot the system, the USB port will work again. This bug can be triggered on all 4 usb ports of the Pi.

Hardware issues on the USB Hub and the hard drives are very unlikely because I can create a raid array on my Pi 4 and on two different linux PCs without any problem.

What can I try to this this issue?
Or could it be possible that this is a hardware issue with my Pi 5?

ejolson
Posts: 12155
Joined: Tue Mar 18, 2014 11:47 am

Re: Raspberry Pi 5 USB Port breaks until reboot when creating a RAID array

Sun Nov 26, 2023 4:30 pm

jandie1505 wrote:
Sat Nov 25, 2023 12:05 pm
I attempted to create a RAID 1 array with two 5 TB hard drives and a powered USB hub on my Raspberry Pi 5.

So I started creating a partition table with parted, creating the partitions with fdisk and then I started the mdadm RAID array with sudo mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sda1 /dev/sdb1.

After I started the RAID array, and it is shown in lsblk:

Code: Select all

NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
loop0         7:0    0  68.5M  1 loop  /snap/core22/867
                                       /snap/core22/867
loop1         7:1    0   169M  1 loop  /snap/lxd/25953
                                       /snap/lxd/25953
loop2         7:2    0 134.8M  1 loop  /snap/lxd/26096
                                       /snap/lxd/26096
loop3         7:3    0  35.5M  1 loop  /snap/snapd/20298
                                       /snap/snapd/20298
sda           8:0    0   4.5T  0 disk  
└─sda1        8:1    0   4.5T  0 part  
  └─md0       9:0    0   4.5T  0 raid1 
sdb           8:16   0   4.5T  0 disk  
└─sdb1        8:17   0   4.5T  0 part  
  └─md0       9:0    0   4.5T  0 raid1 
mmcblk0     179:0    0  59.5G  0 disk  
├─mmcblk0p1 179:1    0   512M  0 part  /boot/firmware
└─mmcblk0p2 179:2    0    59G  0 part  /snap
                                       /
But a few seconds later, both hard drives are completely gone in lsblk:

Code: Select all

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0  68.5M  1 loop /snap/core22/867
                                      /snap/core22/867
loop1         7:1    0   169M  1 loop /snap/lxd/25953
                                      /snap/lxd/25953
loop2         7:2    0 134.8M  1 loop /snap/lxd/26096
                                      /snap/lxd/26096
loop3         7:3    0  35.5M  1 loop /snap/snapd/20298
                                      /snap/snapd/20298
mmcblk0     179:0    0  59.5G  0 disk 
├─mmcblk0p1 179:1    0   512M  0 part /boot/firmware
└─mmcblk0p2 179:2    0    59G  0 part /snap
                                      /
In the kernel log I can see that the USB devices have been disconnected:

Code: Select all

[    0.920761] usbcore: registered new interface driver usbfs
[    0.926276] usbcore: registered new interface driver hub
[    0.931621] usbcore: registered new device driver usb
[    1.347331] usbcore: registered new interface driver lan78xx
[    1.353032] usbcore: registered new interface driver smsc95xx
[    2.740843] xhci-hcd xhci-hcd.0: new USB bus registered, assigned bus number 1
[    2.768524] xhci-hcd xhci-hcd.0: new USB bus registered, assigned bus number 2
[    2.775785] xhci-hcd xhci-hcd.0: Host supports USB 3.0 SuperSpeed
[    2.781951] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.05
[    2.790257] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.797509] usb usb1: Product: xHCI Host Controller
[    2.802406] usb usb1: Manufacturer: Linux 6.5.0-1006-raspi xhci-hcd
[    2.808697] usb usb1: SerialNumber: xhci-hcd.0
[    2.813298] hub 1-0:1.0: USB hub found
[    2.821256] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.05
[    2.829561] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.836812] usb usb2: Product: xHCI Host Controller
[    2.841712] usb usb2: Manufacturer: Linux 6.5.0-1006-raspi xhci-hcd
[    2.848003] usb usb2: SerialNumber: xhci-hcd.0
[    2.852566] hub 2-0:1.0: USB hub found
[    2.865474] xhci-hcd xhci-hcd.1: new USB bus registered, assigned bus number 3
[    2.893078] xhci-hcd xhci-hcd.1: new USB bus registered, assigned bus number 4
[    2.900333] xhci-hcd xhci-hcd.1: Host supports USB 3.0 SuperSpeed
[    2.906489] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.05
[    2.914788] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.922039] usb usb3: Product: xHCI Host Controller
[    2.926933] usb usb3: Manufacturer: Linux 6.5.0-1006-raspi xhci-hcd
[    2.933227] usb usb3: SerialNumber: xhci-hcd.1
[    2.937790] hub 3-0:1.0: USB hub found
[    2.945743] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.05
[    2.954045] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.961300] usb usb4: Product: xHCI Host Controller
[    2.966196] usb usb4: Manufacturer: Linux 6.5.0-1006-raspi xhci-hcd
[    2.972490] usb usb4: SerialNumber: xhci-hcd.1
[    2.977046] hub 4-0:1.0: USB hub found
[    3.197661] usb 3-1: new high-speed USB device number 2 using xhci-hcd
[    3.352334] usb 3-1: New USB device found, idVendor=2109, idProduct=2817, bcdDevice=90.33
[    3.360561] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.367749] usb 3-1: Product: USB2.0 Hub             
[    3.372826] usb 3-1: Manufacturer: VIA Labs, Inc.         
[    3.486051] hub 3-1:1.0: USB hub found
[    3.546632] usb 4-1: new SuperSpeed USB device number 2 using xhci-hcd
[    3.719411] usb 4-1: New USB device found, idVendor=2109, idProduct=0817, bcdDevice=90.33
[    3.727630] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.734793] usb 4-1: Product: USB3.0 Hub             
[    3.739862] usb 4-1: Manufacturer: VIA Labs, Inc.         
[    3.802727] hub 4-1:1.0: USB hub found
[    4.369734] usb 4-1.1: new SuperSpeed USB device number 3 using xhci-hcd
[    4.394792] usb 4-1.1: New USB device found, idVendor=1058, idProduct=2627, bcdDevice=40.10
[    4.403308] usb 4-1.1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[    4.410713] usb 4-1.1: Product: My Passport 2627
[    4.415349] usb 4-1.1: Manufacturer: Western Digital
[    4.420332] usb 4-1.1: SerialNumber: 575836324442314553314655
[    4.505715] usb 4-1.4: new SuperSpeed USB device number 4 using xhci-hcd
[    4.530641] usb 4-1.4: New USB device found, idVendor=1058, idProduct=2627, bcdDevice=40.10
[    4.539054] usb 4-1.4: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[    4.546407] usb 4-1.4: Product: My Passport 2627
[    4.551045] usb 4-1.4: Manufacturer: Western Digital
[    4.556031] usb 4-1.4: SerialNumber: 575843324441314B5A583546
[    6.286449] usbcore: registered new device driver onboard-usb-hub
[    6.305551] usb-storage 4-1.1:1.0: USB Mass Storage device detected
[    6.312397] scsi host0: usb-storage 4-1.1:1.0
[    6.322402] usb-storage 4-1.4:1.0: USB Mass Storage device detected
[    6.343469] scsi host1: usb-storage 4-1.4:1.0
[    6.343639] usbcore: registered new interface driver usb-storage
[    6.352098] usbcore: registered new interface driver uas
[    6.370895] usbcore: registered new interface driver brcmfmac
[    6.650920] hub 3-1:1.0: USB hub found
[    6.837492] usb 4-1.1: USB disconnect, device number 3
[    6.906995] hub 3-1:1.0: USB hub found
[    6.938733] usb 4-1.4: USB disconnect, device number 4
[    7.226945] hub 4-1:1.0: USB hub found
[    7.322953] hub 4-1:1.0: USB hub found
[    7.877744] usb 4-1.1: new SuperSpeed USB device number 5 using xhci-hcd
[    7.898659] usb 4-1.1: New USB device found, idVendor=1058, idProduct=2627, bcdDevice=40.10
[    7.898671] usb 4-1.1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[    7.898675] usb 4-1.1: Product: My Passport 2627
[    7.898679] usb 4-1.1: Manufacturer: Western Digital
[    7.898682] usb 4-1.1: SerialNumber: 575836324442314553314655
[    7.899623] usb-storage 4-1.1:1.0: USB Mass Storage device detected
[    7.899822] scsi host0: usb-storage 4-1.1:1.0
[    7.977760] usb 4-1.4: new SuperSpeed USB device number 6 using xhci-hcd
[    7.998824] usb 4-1.4: New USB device found, idVendor=1058, idProduct=2627, bcdDevice=40.10
[    7.998833] usb 4-1.4: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[    7.998838] usb 4-1.4: Product: My Passport 2627
[    7.998842] usb 4-1.4: Manufacturer: Western Digital
[    7.998845] usb 4-1.4: SerialNumber: 575843324441314B5A583546
[    7.999878] usb-storage 4-1.4:1.0: USB Mass Storage device detected
[    8.000113] scsi host1: usb-storage 4-1.4:1.0
[21539.435402] usb 3-1: USB disconnect, device number 2
[21539.435911] usb 4-1: USB disconnect, device number 2
[21539.435918] usb 4-1.1: USB disconnect, device number 5
[21539.503302] usb 4-1.4: USB disconnect, device number 6
I also reinstalled the OS on the Pi 5 multiple times, and tried both Ubuntu Server 23.10 and Raspberry Pi OS (Bookworm), I had always the same issue.

When this bug happens, the USB port on the Raspberry Pi is also completely broken until I reboot the system. That means that when I unplug the usb hub and plug it back in, nothing happens. When I plug in any other device to this usb port, also nothing happens. Other usb ports are still working. When I reboot the system, the USB port will work again. This bug can be triggered on all 4 usb ports of the Pi.

Hardware issues on the USB Hub and the hard drives are very unlikely because I can create a raid array on my Pi 4 and on two different linux PCs without any problem.

What can I try to this this issue?
Or could it be possible that this is a hardware issue with my Pi 5?
USB disconnects without anything else in the log can result from power problems. Are you using the new 5A supply with the Pi 5? There could also be a bug in the USB device driver. Since a kernel fault was not generated, this is probably not a RAM memory error.

I've had good luck with Syba 4-bay enclosures

https://www.amazon.com/Syba-SY-ENC50104 ... 076ZH262B/

though one of them developed a noisy fan. Such an enclosure may not help here.

Your observation that the corresponding USB port on the Pi doesn't work for other things after the disconnect sounds like a significant clue. Unfortunately, I don't know how to interpret it.

redvli
Posts: 1735
Joined: Thu Sep 03, 2020 8:09 am

Re: Raspberry Pi 5 USB Port breaks until reboot when creating a RAID array

Mon Nov 27, 2023 6:15 am

jandie1505 wrote:
Sat Nov 25, 2023 12:05 pm
I also reinstalled the OS on the Pi 5 multiple times, and tried both Ubuntu Server 23.10 and Raspberry Pi OS (Bookworm), I had always the same issue.

When this bug happens, the USB port on the Raspberry Pi is also completely broken until I reboot the system. That means that when I unplug the usb hub and plug it back in, nothing happens. When I plug in any other device to this usb port, also nothing happens. Other usb ports are still working. When I reboot the system, the USB port will work again. This bug can be triggered on all 4 usb ports of the Pi.

Hardware issues on the USB Hub and the hard drives are very unlikely because I can create a raid array on my Pi 4 and on two different linux PCs without any problem.

What can I try to this this issue?
Or could it be possible that this is a hardware issue with my Pi 5?
If you want help here, do not use Ubuntu, but Raspberry Pi OS 64-bit, updated to latest -rpi6- kernel and matching firmware. Also mention what
versions you are currently running.

In Pi5, the USB infrastructure is handled via RP1 chip AFAIK, also AFAIR it has its own serial port for debugging, that would maybe helpful as the Cortex-M3 or so there is probably telling something about what happened.

Can you also list specifications of that hub between the WDs and the Pi5?

To me it sounds like old problems with Pi4 I had popping up again now with Pi5, might be completely different root cause though. In older firmware (end Buster / early Bullseye), I have seen several USB host controller crashes, result was that the USB device reconnected on a new number but left the filesystem orphaned on earlier one (just 1 USB SSD). In your case, I would have an easy to decide solution: don't use RAID on those portable USB HDD's USB connected on a Pi. What sense does RAID make if the whole solution just does not even work. But 2 independent filesystems might lockup the USB on the Pi5 as wel with you hardware and power solution, so this anyhow seems like a problem/showstopper.

ejolson
Posts: 12155
Joined: Tue Mar 18, 2014 11:47 am

Re: Raspberry Pi 5 USB Port breaks until reboot when creating a RAID array

Mon Nov 27, 2023 6:28 am

redvli wrote:
Mon Nov 27, 2023 6:15 am
In your case, I would have an easy to decide solution: don't use RAID on those portable USB HDD's USB connected on a Pi. What sense does RAID make if the whole solution just does not even work. But 2 independent filesystems might lockup the USB on the Pi5 as wel with you hardware and power solution, so this anyhow seems like a problem/showstopper.
The problem doesn't seem to be the RAID but with connecting two HDs through a hub. Two likely related reports when only copying data from one drive to the other are at

viewtopic.php?t=359625

From that thread it appears the problem may affect certain hubs more than others.

To the person making the original post, I think a work around might be to use the official 5A power supply and directly connect the drives to the Pi without the hub.

redvli
Posts: 1735
Joined: Thu Sep 03, 2020 8:09 am

Re: Raspberry Pi 5 USB Port breaks until reboot when creating a RAID array

Mon Nov 27, 2023 6:42 am

ejolson wrote:
Mon Nov 27, 2023 6:28 am
redvli wrote:
Mon Nov 27, 2023 6:15 am
In your case, I would have an easy to decide solution: don't use RAID on those portable USB HDD's USB connected on a Pi. What sense does RAID make if the whole solution just does not even work. But 2 independent filesystems might lockup the USB on the Pi5 as wel with you hardware and power solution, so this anyhow seems like a problem/showstopper.
The problem doesn't seem to be the RAID but with connecting two HDs through a hub. Two likely related reports when only copying data from one drive to the other are at

viewtopic.php?t=359625

From that thread it appears the problem may affect certain hubs more than others.

To the person making the original post, I think a work around might be to use the official 5A power supply and directly connect the drives to the Pi without the hub.
Yes, I would already suggest a test : cat /dev/sda > /dev/sdb or whatever to generate traffic from 1 blockdevice to the other. Other 'torture' is using reverse (starting at the end/last sector, then towards zero) copy, can be done with ddrescue (or dd_rescue), that will keep HDDs busy.

pjft
Posts: 30
Joined: Fri Jan 20, 2017 11:02 pm

Re: Raspberry Pi 5 USB Port breaks until reboot when creating a RAID array

Mon Nov 27, 2023 12:42 pm

@ejolson

I saw your comment on the other post I have. The symptoms are similar, though the main thing that doesn't quite sit well with me is the lack of the "xHCI host not responding to stop endpoint command" and related messages showing up.

Still, can you share the results of lsusb -tv, and also try the test I describe in the last post here and see how it goes on your end?

viewtopic.php?p=2161883#p2161883

dmesg at the end of it would help.

Thanks, and best of luck - hopefully we get this sorted.

ejolson
Posts: 12155
Joined: Tue Mar 18, 2014 11:47 am

Re: Raspberry Pi 5 USB Port breaks until reboot when creating a RAID array

Wed Nov 29, 2023 2:53 am

pjft wrote:
Mon Nov 27, 2023 12:42 pm
I saw your comment on the other post I have. The symptoms are similar, though the main thing that doesn't quite sit well with me is the lack of the "xHCI host not responding to stop endpoint command" and related messages showing up.
My thought is the Linux RAID subsystem might somehow swallow the error messages people see during a normal copy before disconnect.

At any rate, the problem when copying between two drives connected through a USB hub seems similar to me. I hope the person who made the original post on this thread is able to find a work around until a full solution is found.

redvli
Posts: 1735
Joined: Thu Sep 03, 2020 8:09 am

Re: Raspberry Pi 5 USB Port breaks until reboot when creating a RAID array

Wed Nov 29, 2023 6:14 am

pjft wrote:
Mon Nov 27, 2023 12:42 pm
I saw your comment on the other post I have. The symptoms are similar, though the main thing that doesn't quite sit well with me is the lack of the "xHCI host not responding to stop endpoint command" and related messages showing up.
That message is usually at the end of operations, before you decide or see or notice the system doesn't work properly anymore, so you reboot or powercycle or so, and it gets lost. Especially if rootfs (the /var/log/journal folder) is also working through this USB connections. So if you want to capture all kernel messages more or less unbuffered, you need to store journal somewhere else.

What I do is set loglevel to 8 or 7 and pull the dmesg 'stream' through a serial console cable and store it on another computer. I have tens of sequences of collapsing xHCI host controlers in old logfiles, since kernel 6.1 or so, the Pi4 has a working crash handler that makes sure the system keeps working because the kernel block device is transparently is kept the same and alive. Only short stall that you usually don't notice, unless a double fault or too often in short period of time, then still fatal. Again, the root cause is different in the Pi4, also happens without hub, not with hub.

Note that there is a non-Debian RPiOS config file somewhere in /etc that re-configures loglevel set on the cmdline at kernel load time, so also remove or fix that, otherwise you will anyhow not see those xHCI host not responding messages.

nihil_x
Posts: 3
Joined: Tue Dec 12, 2023 10:21 am

Re: Raspberry Pi 5 USB Port breaks until reboot when creating a RAID array

Tue Dec 12, 2023 10:31 am

Got same Problem with Raid-Array (4 disks on powered hub) on USB3 Port, working fine for months on PI4. On other USB3 Port i have an NVME enclosure (with RTL9210) and Crucial P3, that works, but only with UAS disabled. With UAS enabled i got same disconnects as with Raid-Array (shouldn't RTL9210 support UAS). Btw, nothing more to say, seems that there is something really wrong, i hope it will be fixed soo....for now i put Array back to pi4 and mount it with nfs......

ejolson
Posts: 12155
Joined: Tue Mar 18, 2014 11:47 am

Re: Raspberry Pi 5 USB Port breaks until reboot when creating a RAID array

Tue Dec 12, 2023 6:01 pm

nihil_x wrote:
Tue Dec 12, 2023 10:31 am
Got same Problem with Raid-Array (4 disks on powered hub) on USB3 Port, working fine for months on PI4. On other USB3 Port i have an NVME enclosure (with RTL9210) and Crucial P3, that works, but only with UAS disabled. With UAS enabled i got same disconnects as with Raid-Array (shouldn't RTL9210 support UAS). Btw, nothing more to say, seems that there is something really wrong, i hope it will be fixed soo....for now i put Array back to pi4 and mount it with nfs......
There is a related GitHub issue at

https://github.com/raspberrypi/linux/issues/5753

Given how quickly the failure occurs when using hardware that works with the Pi 4, if there is a solution to be found I'd expect it to be resolved soon. Fortunately, the Pi 4 is still pretty capable as a file server.

nihil_x
Posts: 3
Joined: Tue Dec 12, 2023 10:21 am

Re: Raspberry Pi 5 USB Port breaks until reboot when creating a RAID array

Fri Dec 15, 2023 11:24 am

Yes, i've seen the guthub issue and it seems that issue is fixed now. I think we need to wait a bit till it goes official, but its a great news !

pasquenel
Posts: 3
Joined: Thu Dec 28, 2023 7:15 pm

Re: Raspberry Pi 5 USB Port breaks until reboot when creating a RAID array

Thu Dec 28, 2023 7:37 pm

Here I have also the same problem.
Raid 5 (6 ssd) worked like a charm on RPI-4 (bullseye).
I had configured some quirks to force mass-storage iso UAS.
After that it was stable as a rock.

On the RPI5 I installed bookworm and updated the firmware as well,
I also applied the quirks in cmdline.txt as I had to do on the RPI-4
The raid 5 came up well and the performance is much better than RPI-4.
But ...... it was not stable and I had to reboot it every time the raid was lost due to USB issues.

So I reverted back to RPI-4 and bullseye.

So there is for sure something going wrong on the RPI 5 (bookworm)

Return to “Troubleshooting”