OpenWrt Forum Archive

Topic: Stability issues with high USB I/O

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,
I am having issues with my Netgear WNDR3700 under load. It is used as a small NAS and Media Server with afpd, minidlna and mpd running. Via an usb hub I connected a usb stick for /overlay, a usb soundcard and a 1TB 2,5" drive. The hdd has 2 partitions, one formatted ext3 for Time Machine backups and one NTFS for music/data.

This is working fine most of the time, however when copying files to the data partition while running a TM backup, the router sometimes virtually throws out the usb drive (/dev/sdb) and then recognizes it again as /dev/sdc.

The drive works fine attached to a pc. I have the impression this might be a memory management issue?

Do you have any ideas? Thanks in advance!



Here is the dmesg output:

[...]
usb 1-1.3.2: reset high speed USB device using ar71xx-ehci and address 5
sd 1:0:0:0: [sdb] Unhandled error code
sd 1:0:0:0: [sdb]  Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sdb] CDB: cdb[0]=0x28: 28 00 3e 33 4f 77 00 00 f0 00
end_request: I/O error, dev sdb, sector 1043550071
Buffer I/O error on device sdb1, logical block 130443751
Buffer I/O error on device sdb1, logical block 130443752
Buffer I/O error on device sdb1, logical block 130443753
Buffer I/O error on device sdb1, logical block 130443754
Buffer I/O error on device sdb1, logical block 130443755
Buffer I/O error on device sdb1, logical block 130443756
Buffer I/O error on device sdb1, logical block 130443757
Buffer I/O error on device sdb1, logical block 130443758
Buffer I/O error on device sdb1, logical block 130443759
Buffer I/O error on device sdb1, logical block 130443760
sd 1:0:0:0: [sdb] Unhandled error code
sd 1:0:0:0: [sdb]  Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sdb] CDB: cdb[0]=0x28: 28 00 3e 33 50 67 00 00 10 00
end_request: I/O error, dev sdb, sector 1043550311
sd 1:0:0:0: [sdb] Unhandled error code
sd 1:0:0:0: [sdb]  Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sdb] CDB: cdb[0]=0x2a: 2a 00 4c 7f 23 7f 00 00 20 00
end_request: I/O error, dev sdb, sector 1283400575
sd 1:0:0:0: [sdb] Unhandled error code
sd 1:0:0:0: [sdb]  Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sdb] CDB: cdb[0]=0x2a: 2a 00 4c 7f 23 cf 00 00 10 00
end_request: I/O error, dev sdb, sector 1283400655
sd 1:0:0:0: [sdb] Unhandled error code
sd 1:0:0:0: [sdb]  Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sdb] CDB: cdb[0]=0x2a: 2a 00 4c 7f 7b 7f 00 00 08 00
end_request: I/O error, dev sdb, sector 1283423103
sd 1:0:0:0: [sdb] Unhandled error code
sd 1:0:0:0: [sdb]  Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sdb] CDB: cdb[0]=0x2a: 2a 00 4c 7f 7b cf 00 00 08 00
end_request: I/O error, dev sdb, sector 1283423183
sd 1:0:0:0: [sdb] Unhandled error code
sd 1:0:0:0: [sdb]  Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sdb] CDB: cdb[0]=0x2a: 2a 00 4c 7d 21 b7 00 00 08 00
end_request: I/O error, dev sdb, sector 1283269047
sd 1:0:0:0: [sdb] Unhandled error code
sd 1:0:0:0: [sdb]  Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sdb] CDB: cdb[0]=0x2a: 2a 00 4c 7d 2b bf 00 00 08 00
end_request: I/O error, dev sdb, sector 1283271615
sd 1:0:0:0: [sdb] Unhandled error code
sd 1:0:0:0: [sdb]  Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sdb] CDB: cdb[0]=0x2a: 2a 00 4c 7d 2b df 00 00 08 00
end_request: I/O error, dev sdb, sector 1283271647
sd 1:0:0:0: [sdb] Unhandled error code
sd 1:0:0:0: [sdb]  Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sdb] CDB: cdb[0]=0x2a: 2a 00 4c 7d 2b ef 00 00 08 00
end_request: I/O error, dev sdb, sector 1283271663
sd 1:0:0:0: [sdb] Unhandled error code
sd 1:0:0:0: [sdb]  Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sdb] CDB: cdb[0]=0x2a: 2a 00 4c 7d 38 97 00 00 08 00
end_request: I/O error, dev sdb, sector 1283274903
usb 1-1.3.2: USB disconnect, address 5
sd 1:0:0:0: [sdb] Unhandled error code
sd 1:0:0:0: [sdb]  Result: hostbyte=0x01 driverbyte=0x00
sd 1:0:0:0: [sdb] CDB: cdb[0]=0x2a: 2a 00 4c 7d 4b 7f 00 00 08 00
end_request: I/O error, dev sdb, sector 1283279743
sd 1:0:0:0: [sdb] Unhandled error code
sd 1:0:0:0: [sdb]  Result: hostbyte=0x01 driverbyte=0x00
sd 1:0:0:0: [sdb] CDB: cdb[0]=0x2a: 2a 00 4c 7d 76 f7 00 00 08 00
end_request: I/O error, dev sdb, sector 1283290871
JBD2: Detected IO errors while flushing file data on sdb3-8
Aborting journal on device sdb3-8.
JBD2: I/O error detected when updating journal superblock for sdb3-8.
journal commit I/O error
EXT4-fs error (device sdb3): ext4_find_entry:933: inode #2: comm afpd: reading directory lblock 0
EXT4-fs (sdb3): previous I/O error to superblock detected
EXT4-fs error (device sdb3): ext4_journal_start_sb:260: Detected aborted journal
EXT4-fs (sdb3): Remounting filesystem read-only
EXT4-fs (sdb3): previous I/O error to superblock detected
EXT4-fs (sdb3): previous I/O error to superblock detected
EXT4-fs error (device sdb3): ext4_put_super:728: Couldn't clean up the journal
usb 1-1.3.2: new high speed USB device using ar71xx-ehci and address 7
scsi2 : usb-storage 1-1.3.2:1.0
scsi 2:0:0:0: Direct-Access     PI-239   USB 2.0 Drive    1.08 PQ: 0 ANSI: 4
sd 2:0:0:0: [sdc] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB) ## this is the drive reappearing
sd 2:0:0:0: [sdc] Write Protect is off
sd 2:0:0:0: [sdc] Mode Sense: 23 00 00 00
sd 2:0:0:0: [sdc] Assuming drive cache: write through
sd 2:0:0:0: [sdc] Assuming drive cache: write through
sdc: sdc1 sdc2 sdc3
sd 2:0:0:0: [sdc] Assuming drive cache: write through
sd 2:0:0:0: [sdc] Attached SCSI disk
usb 1-1.3.2: USB disconnect, address 7

It seems to me that the issue might be caused by inotify. I tried the same config now without it and the router no longer gets stuck when using netatalk/timemachine. Is there a way to disable inotify for certain partitions, e.g. with a special mount parameter?

Hello,
I'm experiencing the same issue here, with openwrt 10.03.1-rc5 running on routerstation. The connected HDD is a usb2.0 640GB with ext4 and swap partitions on it, with an external power supply.
Have you found any solution to this problem?

sd 1:0:0:0: [sda] Unhandled error code
sd 1:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 25 45 37 b8 00 00 10 00
end_request: I/O error, dev sda, sector 625293240
Aborting journal on device sda1-8.
EXT4-fs error (device sda1): ext4_journal_start_sb: Detected aborted journal
EXT4-fs (sda1): Remounting filesystem read-only
sd 1:0:0:0: [sda] Unhandled error code
sd 1:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 25 44 08 00 00 00 08 00
end_request: I/O error, dev sda, sector 625215488
Buffer I/O error on device sda1, logical block 78151680
lost page write due to I/O error on sda1
JBD2: I/O error detected when updating journal superblock for sda1-8.
sd 1:0:0:0: [sda] Unhandled error code
sd 1:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 00 00 08 00 00 00 08 00
end_request: I/O error, dev sda, sector 2048
Buffer I/O error on device sda1, logical block 0
lost page write due to I/O error on sda1
EXT4-fs error (device sda1): ext4_put_super: Couldn't clean up the journal

Thanks!

again... sad

sd 1:0:0:0: [sda] Unhandled error code
sd 1:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 10 b7 13 10 00 00 f0 00
end_request: I/O error, dev sda, sector 280433424
Buffer I/O error on device sda1, logical block 35053922
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 35053923
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 35053924
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 35053925
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 35053926
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 35053927
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 35053928
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 35053929
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 35053930
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 35053931
lost page write due to I/O error on sda1
sd 1:0:0:0: [sda] Unhandled error code
sd 1:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 10 b7 14 00 00 00 f0 00
end_request: I/O error, dev sda, sector 280433664
sd 1:0:0:0: [sda] Unhandled error code
sd 1:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 10 b7 14 f0 00 00 f0 00
end_request: I/O error, dev sda, sector 280433904
sd 1:0:0:0: [sda] Unhandled error code
sd 1:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 10 b7 15 e0 00 00 f0 00
end_request: I/O error, dev sda, sector 280434144
sd 1:0:0:0: [sda] Unhandled error code
sd 1:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 10 b7 16 d0 00 00 b8 00
end_request: I/O error, dev sda, sector 280434384
JBD2: Detected IO errors while flushing file data on sda1-8
sd 1:0:0:0: [sda] Unhandled error code
sd 1:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 25 45 df 88 00 00 30 00
end_request: I/O error, dev sda, sector 625336200
Aborting journal on device sda1-8.
sd 1:0:0:0: [sda] Unhandled error code
sd 1:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 1:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 25 44 08 00 00 00 08 00
end_request: I/O error, dev sda, sector 625215488
JBD2: I/O error detected when updating journal superblock for sda1-8.
EXT4-fs error (device sda1): ext4_journal_start_sb: Detected aborted journal
EXT4-fs (sda1): Remounting filesystem read-only

OK, the trick was in an unshielded usb cable (if anyone gets in the same trouble as I did)...

The discussion might have continued from here.