I have built the following configuration:
- Raspberry Pi 4 2GB with original Raspberry power supply 5.1V/3A
- 2 x Samsung SSD 870 EVO 4TB connected to ASMedia USB-SATA Bridge (174c:55aa)
- LogiTech K400+ keyboard
Because a RAID 1 via USB is not possible, I use one SSD as storage and mirror the content of the SSD in regular intervals via rsync to the second SSD.
At first I booted the Raspi from a USB stick, but then the SSDs were not attached at all or only one at boot time. This has been solved since I booted the Raspi from a SD card. Since then both SSDs are available after booting.
My problem now is that (apparently) when higher load runs over the USB ports (robocopy via SMB/CIFS share to the storage SSD), the backup SSD is disconnected after some time. This SSD can only be reconnected by unplugging the USB connector and plugging it back in, then using "sudo mount -a" to mount the disk.
I also already swapped the USB ports and the disks, disabled UASP in /boot/cmdline.txt, disabled USB power limit in /boot/config.txt and I don't remember what else I tested.
When both SSDs are connected, lsusb -t -v looks like this:
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
ID 1d6b:0003 Linux Foundation 3.0 root hub
|__ Port 1: Dev 13, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge
|__ Port 2: Dev 6, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
ID 1d6b:0002 Linux Foundation 2.0 root hub
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
ID 2109:3431 VIA Labs, Inc. Hub
|__ Port 3: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
ID 046d:c52b Logitech, Inc. Unifying Receiver
|__ Port 3: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
ID 046d:c52b Logitech, Inc. Unifying Receiver
|__ Port 3: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
ID 046d:c52b Logitech, Inc. Unifying Receiver
After the disconnet the following is written in the dmesg:
[26638.504569] usb 2-1: USB disconnect, device number 13
[26638.560536] sd 1:0:0:0: [sdb] Synchronizing SCSI cache
[26638.560660] sd 1:0:0:0: [sdb] Synchronize Cache(10) failed: Result: hostbyte=0x01 driverbyte=DRIVER_OK
[10314.565817] usb 2-1: USB disconnect, device number 4
[10314.573913] BTRFS error (device sdb): bdev /dev/sdb errs: wr 1, rd 0, flush 0, corrupt 0, gen 0
[10314.575315] BTRFS error (device sdb): bdev /dev/sdb errs: wr 2, rd 0, flush 0, corrupt 0, gen 0
[10314.576610] BTRFS error (device sdb): bdev /dev/sdb errs: wr 3, rd 0, flush 0, corrupt 0, gen 0
[10314.580781] BTRFS error (device sdb): bdev /dev/sdb errs: wr 4, rd 0, flush 0, corrupt 0, gen 0
[10314.582080] BTRFS error (device sdb): bdev /dev/sdb errs: wr 5, rd 0, flush 0, corrupt 0, gen 0
[10314.583876] BTRFS error (device sdb): bdev /dev/sdb errs: wr 6, rd 0, flush 0, corrupt 0, gen 0
[10314.597196] BTRFS error (device sdb): bdev /dev/sdb errs: wr 7, rd 0, flush 0, corrupt 0, gen 0
[10314.598958] BTRFS error (device sdb): bdev /dev/sdb errs: wr 8, rd 0, flush 0, corrupt 0, gen 0
[10314.600503] BTRFS error (device sdb): bdev /dev/sdb errs: wr 9, rd 0, flush 0, corrupt 0, gen 0
[10314.601754] BTRFS error (device sdb): bdev /dev/sdb errs: wr 10, rd 0, flush 0, corrupt 0, gen 0
[10314.605838] sd 1:0:0:0: [sdb] Synchronizing SCSI cache
[10314.605986] sd 1:0:0:0: [sdb] Synchronize Cache(10) failed: Result: hostbyte=0x01 driverbyte=DRIVER_OK
[10320.057476] btrfs_dev_stat_inc_and_print: 333 callbacks suppressed
[10329.194622] BTRFS: error (device sdb: state A) in __btrfs_free_extent:3070: errno=-5 IO failure
[10329.196596] BTRFS info (device sdb: state EA): forced readonly
[10329.196620] BTRFS error (device sdb: state EA): failed to run delayed ref for logical 332742656 num_bytes 16384 type 176 action 2 ref_mod 1: -5
[10329.196641] BTRFS: error (device sdb: state EA) in btrfs_run_delayed_refs:2144: errno=-5 IO failure
After unplugging the USB connector and plugging it back in the following is written to dmesg:
[ 1103.632869] usb 2-1: new SuperSpeed USB device number 5 using xhci_hcd
[ 1103.654239] usb 2-1: New USB device found, idVendor=174c, idProduct=55aa, bcdDevice= 1.00
[ 1103.654272] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[ 1103.654290] usb 2-1: Product: 1153E
[ 1103.654304] usb 2-1: Manufacturer: Lychee
[ 1103.654318] usb 2-1: SerialNumber: 00606E00000E
[ 1103.659798] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 1103.661003] usb-storage 2-1:1.0: Quirks match for vid 174c pid 55aa: 400000
[ 1103.662319] scsi host0: usb-storage 2-1:1.0
[ 1104.685505] scsi 0:0:0:0: Direct-Access ASMT 2115 0 PQ: 0 ANSI: 6
[ 1104.687843] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 1104.689690] sd 0:0:0:0: [sda] Spinning up disk...
[ 1105.708430] ..............ready
[ 1119.021497] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[ 1119.022249] sd 0:0:0:0: [sda] Write Protect is off
[ 1119.022269] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 1119.023029] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1119.030131] sd 0:0:0:0: [sda] Attached SCSI disk
[ 1119.124002] BTRFS: device fsid 4723f8f1-d3f1-465f-a66e-cf895f0858db devid 1 transid 230 /dev/sda scanned by systemd-udevd (22949)
[ 1150.214324] BTRFS info (device sda): using crc32c (crc32c-generic) checksum algorithm
[ 1150.214375] BTRFS info (device sda): enabling ssd optimizations
[ 1150.214385] BTRFS info (device sda): disk space caching is enabled
Shortly after that the SSD is disconnected again with the following messegas in dmesg:
[ 1195.465919] usb 2-1: USB disconnect, device number 5
[ 1195.517901] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1195.518123] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=0x01 driverbyte=DRIVER_OK
[ 1195.519014] BTRFS error (device sda): bdev /dev/sda errs: wr 0, rd 1, flush 0, corrupt 0, gen 0
[ 1195.519084] BTRFS error (device sda): error reading free space cache
[ 1195.519100] BTRFS warning (device sda): failed to load free space cache for block group 30408704, rebuilding it now
[ 1195.519209] BTRFS error (device sda): bdev /dev/sda errs: wr 0, rd 2, flush 0, corrupt 0, gen 0
[ 1195.519266] BTRFS error (device sda): bdev /dev/sda errs: wr 0, rd 3, flush 0, corrupt 0, gen 0
[ 1195.521669] BTRFS error (device sda): bdev /dev/sda errs: wr 0, rd 4, flush 0, corrupt 0, gen 0
[ 1195.521869] BTRFS error (device sda): bdev /dev/sda errs: wr 0, rd 5, flush 0, corrupt 0, gen 0
[ 1195.523828] BTRFS: error (device sda: state A) in __btrfs_free_extent:3070: errno=-5 IO failure
[ 1195.525180] BTRFS info (device sda: state EA): forced readonly
[ 1195.525197] BTRFS error (device sda: state EA): failed to run delayed ref for logical 60719104 num_bytes 16384 type 176 action 2 ref_mod 1: -5
[ 1195.525217] BTRFS: error (device sda: state EA) in btrfs_run_delayed_refs:2144: errno=-5 IO failure
[ 1195.528019] BTRFS warning (device sda: state EA): Skipping commit of aborted transaction.
[ 1195.528053] BTRFS: error (device sda: state EA) in cleanup_transaction:1958: errno=-5 IO failure
[ 1195.530150] BTRFS error (device sda: state EA): commit super ret -5
It would be nice if someone had a similar experience and could give me an idea how to prevent the disconnect of the backup SSD.