I'm running rsync to backup a remote machine to a USB hard drive on an ARM SBC and sometimes rsync just stops with "read error from input device (I/O error)". I believe the issue is related to UAS + USB 3.0 + rsync causing high I/O load, because of uas_eh_device_reset_handler
on /var/log/messages
:
sd 0:0:0:0: [sda] tag#1 data cmplt err -32 uas-tag 2 inflight:
sd 0:0:0:0: [sda] tag#1 CDB: opcode=0x28 28 00 38 80 0a 68 00 00 a0 00
sd 0:0:0:0: [sda] tag#0 data cmplt err -32 uas-tag 1 inflight: CMD
sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 57 50 28 78 00 03 00 00
sd 0:0:0:0: [sda] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD
sd 0:0:0:0: [sda] tag#1 CDB: opcode=0x28 28 00 38 80 0a 68 00 00 a0 00
sd 0:0:0:0: [sda] tag#2 uas_eh_abort_handler 0 uas-tag 3 inflight: CMD
sd 0:0:0:0: [sda] tag#2 CDB: opcode=0x2a 2a 00 19 47 7f 20 00 00 90 00
sd 0:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD
sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 57 50 28 78 00 03 00 00
scsi host0: uas_eh_device_reset_handler start
usb 5-1: reset high-speed USB device number 2 using ehci-platform
scsi host0: uas_eh_device_reset_handler success
sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
sd 0:0:0:0: [sda] tag#0 Sense Key : 0x2 [current]
sd 0:0:0:0: [sda] tag#0 ASC=0x3a ASCQ=0x0
sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 57 50 28 78 00 03 00 00
sd 0:0:0:0: [sda] tag#1 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
sd 0:0:0:0: [sda] tag#1 Sense Key : 0x2 [current]
sd 0:0:0:0: [sda] tag#1 ASC=0x3a ASCQ=0x0
sd 0:0:0:0: [sda] tag#1 CDB: opcode=0x2a 2a 00 19 47 7f 20 00 00 90 00
EXT4-fs warning (device sda1): ext4_end_bio:323: I/O error 10 writing to inode 13001563 (offset 0 size 73728 starting block 53014518)
This SBC doesn't have a USB 3 port, however it still loads the hard drive with UAS. According to this, UAS is broken on some HD enclosure chips. The solution provided is to disable UAS, however:
1- If I blacklist UAS completely with blacklist uas
into /etc/modprobe.d/blacklist-uas.conf
I get:
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
Looking at Class=Mass Storage, Driver=, 480M
=> seems like the system doesn't load any other way to deal with the drive.
2- If I just try to disable UAS for a specific USB device, like the post recommended, it still loads with UAS:
echo options usb-storage quirks=174c:55aa:u | tee /etc/modprobe.d/blacklist-uas.conf
update-initramfs -u
reboot
(...)
dmesg | grep sda
[ 2.488105] sd 0:0:0:0: [sda] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB)
[ 2.488584] sd 0:0:0:0: [sda] Write Protect is off
[ 2.488592] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 2.489335] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 2.539288] sda: sda1
[ 2.543875] sd 0:0:0:0: [sda] Attached SCSI disk
[ 6.898109] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: errors=remount-ro,data=ordered
lsusb | grep ASMedia
Bus 005 Device 002: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge
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=uas, 480M
What am I doing wrong? Is it possible to disable UAS and make the system still use the HD any other way? Why does options usb-storage quirks=174c:55aa:u
doesn't disable UAS as it should?
Thank you.
Some notes:
- OS: Debian GNU/Linux 9.4 (stretch) kernel
4.14.18-sunxi64
from armbian - SBC: NanoPi NEO2
update-initramfs -u
. The kernel is4.14.18-sunxi64
from armbian.usb_storage
doesn't show underlsmod
so I guess it is build in. How should I "move the option to the kernel boot"? Thank you.echo "174c:55aa:u" >/sys/module/usb_storage/parameters/quirks
but how permanent is this? Will it survive a reboot? If no, where should I put it?