你是否会在日志里看到这些错误呢?
1 2 3 4 5 | 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 |
这可能是因为驱动的问题,你可以使用以下命令查看:
1 2 3 | 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查看):
1 2 | root@starx:~# lsusb | grep JM Bus 001 Device 004: ID 156d:0777 JMicron Technology Corp. / JMicron USA Technology Corp. |
开始进入解决问题:
编辑 /boot/armbianEnv.txt 文件:
1 2 3 4 5 | 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 |
更改usbstoragequirks的值,更改后的的样子为:
1 2 3 4 5 | 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 |
接下来运行以下命令并重启:
1 2 | update-initramfs -u reboot |
进入系统后,插入H1,查看日志:
1 2 3 4 5 6 7 8 | 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 |
看到这行即为成功:
1 | UAS is blacklisted for this device, using usb-storage instead |
再次确认驱动状态:
1 2 3 4 5 | 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 |
看到以下字符表示成功
1 | Driver=usb-storage |
结束。
感谢Armbian论坛的大佬:
https://forum.armbian.com/topic/7126-nanopi-neo2-usb-disk-rsync-io-errors/
0 条评论