Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4204

Troubleshooting • Re: Raspberry pi 5: usb disk disconnects randomly

$
0
0
just found this thread after several frustrating back and forths on reddit.

background:
Pi5 with a USB HDD (2.5") connected to the USB3 port (mounted as sda) and a USB stick on USB2 (mounted as sdb). PI5 boots from the USB stick. Device is set up as a simple Samba server on my home network. I had a similar setup with a Pi4, and wanted more performance, so i got a Pi5.

Issue:
The USB HDD on sda would occasionally change to sdc with the below dmesg errors. the 2.5" HDD is connected using a Sabrent SATA to USB cable https://www.amazon.com/gp/product/B011M ... UTF8&psc=1 and the power supply for the Pi is rated at 27W https://www.amazon.com/gp/product/B0CQ2 ... UTF8&psc=1

What i've seen is that this usually happens when the disk spins down after some idle time, and the disk is accessed from a Windows box after it has spun down.

Is this the same issue? should i look into disabling UAS as well? i've kinda hit a wall with my linux knowledge here. So appreciate any help here.

thanks!

Code:

[57530.748939] usb 2-1: cmd cmplt err -71[57536.031928] scsi host1: uas_pre_reset: timed out[57536.032154] sd 1:0:0:0: [sda] tag#22 uas_zap_pending 0 uas-tag 1 inflight: CMD[57536.032159] sd 1:0:0:0: [sda] tag#22 CDB: opcode=0x28 28 00 17 6b 03 20 00 00 04 00[57536.032175] sd 1:0:0:0: [sda] tag#22 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=DRIVER_OK cmd_age=5s[57536.032186] sd 1:0:0:0: [sda] tag#22 CDB: opcode=0x28 28 00 17 6b 03 20 00 00 04 00[57536.032189] I/O error, dev sda, sector 3143112960 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2[57536.032241] device offline error, dev sda, sector 3143112960 op 0x0:(READ) flags 0x0 phys_seg 4 prio class 2[57536.032247] Buffer I/O error on dev sda1, logical block 392888864, async page read[57536.032251] Buffer I/O error on dev sda1, logical block 392888865, async page read[57536.032253] Buffer I/O error on dev sda1, logical block 392888866, async page read[57536.032255] Buffer I/O error on dev sda1, logical block 392888867, async page read[57536.034009] device offline error, dev sda, sector 3353754064 op 0x1:(WRITE) flags 0x0 phys_seg 1 prio class 2[57536.034016] Buffer I/O error on dev sda1, logical block 419219002, lost async page write[57536.034024] device offline error, dev sda, sector 452776 op 0x1:(WRITE) flags 0x0 phys_seg 1 prio class 2[57536.034028] Buffer I/O error on dev sda1, logical block 56341, lost async page write[57536.147947] sd 1:0:0:0: [sda] Synchronizing SCSI cache[57536.383934] sd 1:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=0x07 driverbyte=DRIVER_OK[57536.384282] usb 2-1: Disable of device-initiated U1 failed.[57536.384295] usb 2-1: Disable of device-initiated U2 failed.[57536.385498] usb 2-1: Enable of device-initiated U1 failed.[57536.385614] usb 2-1: Enable of device-initiated U2 failed.[57536.584044] usb 2-1: reset SuperSpeed USB device number 2 using xhci-hcd[57536.610784] scsi host2: uas[57536.612439] scsi 2:0:0:0: Direct-Access     SABRENT                   0204 PQ: 0 ANSI: 6[57536.615535] sd 2:0:0:0: Attached scsi generic sg0 type 0[57539.985899] Buffer I/O error on dev sda1, logical block 450162040, async page read[57539.985906] Buffer I/O error on dev sda1, logical block 450162041, async page read[57539.985908] Buffer I/O error on dev sda1, logical block 450162042, async page read[57539.985910] Buffer I/O error on dev sda1, logical block 450162043, async page read[57541.390909] sd 2:0:0:0: [sdc] 1220942646 4096-byte logical blocks: (5.00 TB/4.55 TiB)[57541.391096] sd 2:0:0:0: [sdc] Write Protect is off[57541.391099] sd 2:0:0:0: [sdc] Mode Sense: 53 00 00 08[57541.391416] sd 2:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA[57541.391607] sd 2:0:0:0: [sdc] Preferred minimum I/O size 4096 bytes[57541.391610] sd 2:0:0:0: [sdc] Optimal transfer size 33550336 bytes[57541.395187]  sdc: sdc1[57541.395304] sd 2:0:0:0: [sdc] Attached SCSI disk[57552.903489] Buffer I/O error on dev sda1, logical block 450162040, async page read[57552.903501] Buffer I/O error on dev sda1, logical block 450162041, async page read[57552.903504] Buffer I/O error on dev sda1, logical block 450162042, async page read[57552.903507] Buffer I/O error on dev sda1, logical block 450162043, async page read
That is a bus powered Sata bridge. Likely what happens is the disk takes too much current to spin up again and knocks itself offline. This means you are too close to power limits for reliable function.

Check your logs for under volt using dmsg and check the Pi low voltage throttling status using vcgencmd get_throttled.

Note this is likely not a Linux problem but rather a Pi specific difficulty. I think you are right that Linux knowledge could help fix the problem.

Statistics: Posted by ejolson — Sat May 18, 2024 4:13 pm



Viewing all articles
Browse latest Browse all 4204

Trending Articles