你是否会在日志里看到这些错误呢?

root@starx:~# journalctl -xe | grep uas Feb 13 22:46:32 starx.ml kernel: sd 1:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD Feb 13 22:46:59 starx.ml kernel: sd 1:0:0:0: tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD Feb 13 22:46:59 starx.ml kernel: scsi host1: uas_eh_device_reset_handler start Feb 13 22:46:59 starx.ml kernel: scsi host1: uas_eh_device_reset_handler success
Code language: PHP (php)

这可能是因为驱动的问题,你可以使用以下命令查看:

lsusb -t /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=, 480M

我们先获取问题设备的USBID(H1硬盘一般是JM公司的芯片,其他可以lsusb查看):

root@starx:~# lsusb | grep JM Bus 001 Device 004: ID 156d:0777 JMicron Technology Corp. / JMicron USA Technology Corp.
Code language: PHP (php)

开始进入解决问题:

编辑 /boot/armbianEnv.txt 文件:

rootdev=UUID=e4f3cef1-6360-464a-a70d-21cfd96b763c rootfstype=BOOT_IMAGE=/boot/vmlinuz-4.15.0-36-generic rootdev=LABEL=ROOTFS rootfstype=ext4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
Code language: JavaScript (javascript)

更改usbstoragequirks的值,更改后的的样子为:

rootdev=UUID=e4f3cef1-6360-464a-a70d-21cfd96b763c rootfstype=BOOT_IMAGE=/boot/vmlinuz-4.15.0-36-generic rootdev=LABEL=ROOTFS rootfstype=ext4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u,156d:0777:u
Code language: JavaScript (javascript)

接下来运行以下命令并重启:

update-initramfs -u reboot

进入系统后,插入H1,查看日志:

root@starx:~# dmesg | grep 'usb 1-1' [ 970.795506] usb 1-1: new high-speed USB device number 4 using xhci-hcd [ 970.992235] usb 1-1: New USB device found, idVendor=152d, idProduct=0576, bcdDevice=41.01 [ 970.992243] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 970.992247] usb 1-1: Product: PhiHardisk H1 [ 970.992250] usb 1-1: Manufacturer: www.phicomm.com [ 970.992253] usb 1-1: SerialNumber: FC2333333333 [ 970.994302] usb 1-1: UAS is blacklisted for this device, using usb-storage instead
Code language: PHP (php)

看到这行即为成功:

UAS is blacklisted for this device, using usb-storage instead
Code language: JavaScript (javascript)

再次确认驱动状态:

root@starx:~# lsusb -t /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/0p, 5000M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M |__ Port 1: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M

看到以下字符表示成功

Driver=usb-storage

结束。

感谢Armbian论坛的大佬:

https://forum.armbian.com/topic/7126-nanopi-neo2-usb-disk-rsync-io-errors/

分类: Linux

0 条评论

发表评论

Avatar placeholder

您的电子邮箱地址不会被公开。

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据