Odroid XU4:在 USB 3.0 上运行 10 分钟后硬盘就死掉了

Odroid XU4:在 USB 3.0 上运行 10 分钟后硬盘就死掉了

我最近通过 USB 3.0 扩展坞将 3 TB 硬盘连接到我的 Odroid XU4。它被正确检测到并安装了它。

但在写入大约 10 GB 数据后,我遇到了很多错误。我的 /var/log/syslog 看起来像这样:

odroid kernel: [410867.640870] usb 4-1.2: new SuperSpeed USB device number 3 using xhci-hcd
odroid kernel: [410867.662186] usb 4-1.2: New USB device found, idVendor=067b, idProduct=2773
odroid kernel: [410867.662217] usb 4-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
odroid kernel: [410867.662240] usb 4-1.2: Product: Quickport Combo U3
odroid kernel: [410867.662262] usb 4-1.2: Manufacturer: SHARKOON
odroid kernel: [410867.662283] usb 4-1.2: SerialNumber: SHARK000000002
odroid kernel: [410867.666319] usb-storage 4-1.2:1.0: USB Mass Storage device detected
odroid kernel: [410867.672956] scsi host0: usb-storage 4-1.2:1.0
odroid mtp-probe: checking bus 4, device 3: "/sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2"
odroid mtp-probe: bus: 4, device: 3 was not an MTP device
odroid kernel: [410867.773185] usbcore: registered new interface driver uas
odroid kernel: [410868.753587] scsi 0:0:0:0: Direct-Access     ST3000DM 001-1CH166       CC29 PQ: 0 ANSI: 0
odroid kernel: [410868.758912] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
odroid kernel: [410868.759096] sd 0:0:0:0: Attached scsi generic sg0 type 0
odroid kernel: [410868.760501] sd 0:0:0:0: [sda] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
odroid kernel: [410868.761937] sd 0:0:0:0: [sda] Write Protect is off
odroid kernel: [410868.762049] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
odroid kernel: [410868.763561] sd 0:0:0:0: [sda] No Caching mode page found
odroid kernel: [410868.767656] sd 0:0:0:0: [sda] Assuming drive cache: write through
odroid kernel: [410868.777812] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
odroid kernel: [410868.847735]  sda: sda1 sda2 sda3
odroid kernel: [410868.861331] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
odroid kernel: [410868.865234] sd 0:0:0:0: [sda] Attached SCSI disk
odroid systemd[1]: dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device: Dev dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device appeared twice with different sysfs paths /sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda3 and /sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda2
odroid systemd[944]: dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device: Dev dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device appeared twice with different sysfs paths /sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda3 and /sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda2
odroid systemd[20118]: dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device: Dev dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device appeared twice with different sysfs paths /sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda2 and /sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda3
odroid kernel: [411003.006383] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
odroid systemd[20118]: dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device: Dev dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition.device appeared twice with different sysfs paths /sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda2 and /sys/devices/platform/soc:/soc:usb3-0:/12000000.dwc3:/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda/sda3
odroid kernel: [411443.428924] usb 4-1.2: reset SuperSpeed USB device number 3 using xhci-hcd
odroid kernel: [411443.449604] usb 4-1.2: device firmware changed
odroid kernel: [411444.469255] usb 4-1-port2: cannot disable (err = -110)
odroid kernel: [411444.569096] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
odroid kernel: [411444.569151] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 01 c4 13 00 00 00 01 00 00 00
odroid kernel: [411444.569188] blk_update_request: I/O error, dev sda, sector 29627136
odroid kernel: [411444.673957] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
odroid kernel: [411444.673993] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 b0 13 88 00 00 00 00 08 00 00
odroid kernel: [411444.674017] blk_update_request: I/O error, dev sda, sector 2954070016
odroid kernel: [411444.679304] EXT4-fs error (device sda3): ext4_wait_block_bitmap:503: comm kworker/u16:0: Cannot read block bitmap - block_group = 96, block_bitmap = 3145728
odroid kernel: [411444.770110] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
odroid kernel: [411444.770145] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x8a 8a 00 00 00 00 00 b0 13 48 00 00 00 08 00 00 00
odroid kernel: [411444.770169] blk_update_request: I/O error, dev sda, sector 2954053632
odroid kernel: [411444.775389] EXT4-fs warning (device sda3): ext4_end_bio:314: I/O error -5 writing to inode 122 (offset 0 size 8388608 starting block 369256960)
odroid kernel: [411444.775430] Buffer I/O error on device sda3, logical block 3143680
odroid kernel: [411444.781543] Buffer I/O error on device sda3, logical block 3143681
odroid kernel: [411444.787798] Buffer I/O error on device sda3, logical block 3143682
odroid kernel: [411444.794033] Buffer I/O error on device sda3, logical block 3143683
odroid kernel: [411444.800266] Buffer I/O error on device sda3, logical block 3143684
odroid kernel: [411444.806506] Buffer I/O error on device sda3, logical block 3143685
odroid kernel: [411444.812743] Buffer I/O error on device sda3, logical block 3143686
odroid kernel: [411444.818985] Buffer I/O error on device sda3, logical block 3143687
odroid kernel: [411444.825237] Buffer I/O error on device sda3, logical block 3143688
odroid kernel: [411444.831461] Buffer I/O error on device sda3, logical block 3143689
odroid kernel: [411444.928916] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
odroid kernel: [411444.928946] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x8a 8a 00 00 00 00 00 ae 93 88 00 00 00 00 08 00 00
odroid kernel: [411444.928965] blk_update_request: I/O error, dev sda, sector 2928904192
odroid kernel: [411444.934145] Buffer I/O error on dev sda3, logical block 0, lost sync page write
odroid kernel: [411444.941579] EXT4-fs (sda3): Delayed block allocation failed for inode 122 at logical offset 2048 with max blocks 2048 with error 5
odroid kernel: [411444.953239] EXT4-fs (sda3): This should not happen!! Data will be lost

它被卸载,我无法再次安装它。我必须断开 USB 电缆并重新连接。

所以我检查了 SMART ...没有发现错误。事实证明,它可以与 USB 2.0 配合使用。现在复制数据几个小时没有错误。我通过 USB 3.0 尝试了不同的 HDD,并得到了类似的结果。写了一些之后,它就断开了。

有任何想法吗?

答案1

这可能与UAS有关(USB 连接 SCSI) 模式。它仅从 USB 3.0 开始正式可用,因此这可以解释为什么 USB 2.0 工作正常(未选择 UAS)。

该问题通常与固件实施不当有关适配器,或者无论如何,与 Linux 驱动程序通信时存在互操作性问题。硬件/固件供应商制作的商业驱动程序可能会对这些错误进行特殊处理,因为供应商已知这些错误。

如果无法解决问题,有时可以通过禁用某些功能来解决该问题。在Linux上有至少 5 个 USB 存储怪异标志以禁用 UAS 功能(f,g,j,t,u) 手动。当模型被明确识别为行为不良时,它们会被添加到内部黑名单中以自动应用这些怪癖。您必须手动添加启动选项或 USB 存储模块选项。

因此,首先尝试使用 quirk u 完全禁用 UAS,看看是否能解决问题。稍后请参阅例如使用 t 或 g 选项而不是 u 是否就足够了。

内核命令行启动选项(使用日志中看到的 VID:PID):

usb-storage.quirks=067b:2773:u

模块选项(在 /etc/modprobe.d 中创建一个文件):

options usb-storage quirks=067b:2773:u

无人机系统提供的开销较少,否则这不应该成为问题。

您应该尝试使用不同的硬盘驱动器适配器来自其他供应商(不同的 VID)的信息,以真正查看 UAS 模式下的行为是否存在差异。

相关内容