[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: problems with USB disk



On Sat, Oct 23, 2010 at 12:27:27PM +0000, Camaleón wrote:
> On Sat, 23 Oct 2010 02:49:10 +0200, lee wrote:
> 
> > On Fri, Oct 22, 2010 at 03:36:44PM +0000, Camaleón wrote:
> >> On Fri, 22 Oct 2010 14:07:09 +0200, lee wrote:
> >> 
> >> > I´m having trouble copying files for backup purposes to an USB disk
> >> > with rsync. Copying the files sometimes fails with "Input/output
> >> > error (5)", and I´m getting messages in the syslog like these:
> >> 
> >> (...)
> >> 
> >> > [128627.397894] EXT4-fs error (device sdf3):> __ext4_get_inode_loc:
> >> > unable to read inode block - inode=52298807, block=209191011
> >> 
> >> That looks like a filesystem error/corruption. Did you fsck-it?
> > 
> > I´ve had this two or three times before when the disk was connected to
> > an USB 3.0 controller. (It´s an USB 3.0 capable enclosure.) Last time
> > when there were copying errors, the disk was connected to the USB 3.0
> > controller. Umount and sync would just hang indefinitely. When I tried
> > to rmmod the xhci module, the computer froze :(
> 
> Have you tested the unit with another computer? Just in case...

No, I don´t really have one I could test it with.

> OTOH, what USB drive is this (brand and model)? :-?

I don´t remember, and I don´t have the package anymore. The enclosure
has a label on it that says "airy".

> (...)
> 
> > If the cable or the enclosure were defective, could I sometimes write
> > about 650GB without problems and sometimes not? I leave the USB cable
> > plugged in, so no changes between working/failing there.
> > 
> > Perhaps the best way is to get a new USB 3.0 cable and do some testing
> > on this disk ...
> 
> I see. It's an embedded USB disk enclosure that does not allow to extract 
> the disk without removing guarantee and all that annoyances. That's why I 
> avoid these devices (I prefer buying the USB case and hard disk separated 
> with external power supply) :-(

It does have an external power supply. I also prefer to choose an
enclosure, but I needed an USB disk fast when I bought it ... I even
expected it to fail soon.

> Well, read the manufacturer's specs for the unit (file system format 
> support) and check it with another computer using one of the supported 
> formatting options (better yet, ext3 if available) to see what happens. 
> If you are still facing the same problems, just RMA the drive.

Well, look at this:


root@yun:/mnt# mkfs -t ext4 /dev/sdf3
mke2fs 1.41.12 (17-May-2010)
[...]
root@yun:/mnt# sync
root@yun:/mnt# sync
root@yun:/mnt# sync
root@yun:/mnt# fsck /dev/sdf3
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
/dev/sdf3: sauber, 11/89440256 Dateien, 5664101/357759517 Blöcke
root@yun:/mnt# mount /dev/sdf3 usb-ext4/
root@yun:/mnt# cd usb-ext4/
root@yun:/mnt/usb-ext4# ls -la
insgesamt 24
drwxr-xr-x 3 root root  4096 23. Okt 16:01 .
drwxr-xr-x 3 root root  4096 11. Okt 16:09 ..
drwx------ 2 root root 16384 23. Okt 16:01 lost+found
root@yun:/mnt/usb-ext4# mkdir gen-00
root@yun:/mnt/usb-ext4# mkdir gen-01
root@yun:/mnt/usb-ext4# cd ..
root@yun:/mnt# umount usb-ext4/
root@yun:/mnt# fsck /dev/sdf3
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
/dev/sdf3: sauber, 13/89440256 Dateien, 5664103/357759517 Blöcke
root@yun:/mnt# fsck -f /dev/sdf3
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
Durchgang 1: Prüfe Inodes, Blocks, und Größen
Durchgang 2: Prüfe Verzeichnis Struktur
Durchgang 3: Prüfe Verzeichnis Verknüpfungen
Durchgang 4: Überprüfe die Referenzzähler
Durchgang 5: Überprüfe Gruppe Zusammenfassung
Lesefehler - Block 341835776 (Attempt to read block from filesystem resulted in short read) während lese Inode und Block bitmaps. Ignoriere Fehler<j>? ja

Rückschreiben erzwingen<j>? ja

Block Bitmap differieren:  +(341835776--341843999)
Repariere<j>? ja


/dev/sdf3: ***** DATEISYSTEM WURDE VERÄNDERT *****
/dev/sdf3: 13/89440256 Dateien (0.0% nicht zusammenhängend), 5664103/357759517 Blöcke


[69303.513244] sd 10:0:0:0: [sdf] Unhandled sense code
[69303.513253] sd 10:0:0:0: [sdf] Result: hostbyte=0x00 driverbyte=0x08
[69303.513263] sd 10:0:0:0: [sdf] Sense Key : 0x3 [current] 
[69303.513272] sd 10:0:0:0: [sdf] ASC=0x11 ASCQ=0x0
[69303.513280] sd 10:0:0:0: [sdf] CDB: cdb[0]=0x28: 28 00 a7 10 96 55 00 00 08 00
[69303.513297] end_request: I/O error, dev sdf, sector 2802882133
[69303.513308] Buffer I/O error on device sdf3, logical block 683671552
[69303.513318] Buffer I/O error on device sdf3, logical block 683671553
[69306.841513] sd 10:0:0:0: [sdf] Unhandled sense code
[69306.841522] sd 10:0:0:0: [sdf] Result: hostbyte=0x00 driverbyte=0x08
[69306.841531] sd 10:0:0:0: [sdf] Sense Key : 0x3 [current] 
[69306.841540] sd 10:0:0:0: [sdf] ASC=0x11 ASCQ=0x0
[69306.841547] sd 10:0:0:0: [sdf] CDB: cdb[0]=0x28: 28 00 a7 10 96 55 00 00 08 00
[69306.841563] end_request: I/O error, dev sdf, sector 2802882133
[69306.841573] Buffer I/O error on device sdf3, logical block 683671552
[69306.841583] Buffer I/O error on device sdf3, logical block 683671553


root@yun:/mnt# fsck -f /dev/sdf3
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
Durchgang 1: Prüfe Inodes, Blocks, und Größen
Durchgang 2: Prüfe Verzeichnis Struktur
Durchgang 3: Prüfe Verzeichnis Verknüpfungen
Durchgang 4: Überprüfe die Referenzzähler
Durchgang 5: Überprüfe Gruppe Zusammenfassung
/dev/sdf3: 13/89440256 Dateien (0.0% nicht zusammenhängend),
5664103/357759517 Blöcke
root@yun:/mnt# mount /dev/sdf3 usb-ext4/
root@yun:/mnt# cp /boot/vmlinuz-2.6.32 usb-ext4/
root@yun:/mnt# umount usb-ext4/
root@yun:/mnt# fsck -f /dev/sdf3
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
Durchgang 1: Prüfe Inodes, Blocks, und Größen
Durchgang 2: Prüfe Verzeichnis Struktur
Durchgang 3: Prüfe Verzeichnis Verknüpfungen
Durchgang 4: Überprüfe die Referenzzähler
Durchgang 5: Überprüfe Gruppe Zusammenfassung
/dev/sdf3: 14/89440256 Dateien (0.0% nicht zusammenhängend),
5664598/357759517 Blöcke
root@yun:/mnt# mkfs -t ext4 /dev/sdf3
mke2fs 1.41.12 (17-May-2010)
[...]
root@yun:/mnt# fsck -f /dev/sdf3
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
Durchgang 1: Prüfe Inodes, Blocks, und Größen
Durchgang 2: Prüfe Verzeichnis Struktur
Durchgang 3: Prüfe Verzeichnis Verknüpfungen
Durchgang 4: Überprüfe die Referenzzähler
Durchgang 5: Überprüfe Gruppe Zusammenfassung
/dev/sdf3: 11/89440256 Dateien (0.0% nicht zusammenhängend), 5664101/357759517 Blöcke
root@yun:/mnt# mount /dev/sdf3 usb-ext4/
root@yun:/mnt# ls -la usb-ext4/
insgesamt 24
drwxr-xr-x 3 root root  4096 23. Okt 16:59 .
drwxr-xr-x 3 root root  4096 11. Okt 16:09 ..
drwx------ 2 root root 16384 23. Okt 16:59 lost+found
root@yun:/mnt# umount usb-ext4/
root@yun:/mnt# fsck -f /dev/sdf3
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
Durchgang 1: Prüfe Inodes, Blocks, und Größen
Durchgang 2: Prüfe Verzeichnis Struktur
Durchgang 3: Prüfe Verzeichnis Verknüpfungen
Durchgang 4: Überprüfe die Referenzzähler
Durchgang 5: Überprüfe Gruppe Zusammenfassung
/dev/sdf3: 11/89440256 Dateien (0.0% nicht zusammenhängend), 5664101/357759517 Blöcke
root@yun:/mnt# mount /dev/sdf3 usb-ext4/
root@yun:/mnt# mkdir usb-ext4/gen-00
root@yun:/mnt# mkdir usb-ext4/gen-01
root@yun:/mnt# umount usb-ext4/
root@yun:/mnt# fsck -f /dev/sdf3
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
Durchgang 1: Prüfe Inodes, Blocks, und Größen
Durchgang 2: Prüfe Verzeichnis Struktur
Durchgang 3: Prüfe Verzeichnis Verknüpfungen
Durchgang 4: Überprüfe die Referenzzähler
Durchgang 5: Überprüfe Gruppe Zusammenfassung
/dev/sdf3: 13/89440256 Dateien (0.0% nicht zusammenhängend), 5664103/357759517 Blöcke
root@yun:/mnt# mount /dev/sdf3 usb-ext4/
root@yun:/mnt# cd usb-ext4/gen-00/
root@yun:/mnt/usb-ext4/gen-00# rsync -a --stats --delete -H --numeric-ids /home/ home/
sent 688043897712 bytes  received 19335296 bytes  49293493.79 bytes/sec
total size is 687890689181  speedup is 1.00
root@yun:/mnt/usb-ext4/gen-00# sync
root@yun:/mnt/usb-ext4/gen-00# cd ..
root@yun:/mnt/usb-ext4# cd ..
root@yun:/mnt# umount usb-ext4/
root@yun:/mnt# fsck -f /dev/sdf3
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
Durchgang 1: Prüfe Inodes, Blocks, und Größen
Lesefehler - Block 335020074 (Attempt to read block from filesystem resulted in short read) während beim Lesen des nächsten Inodes. Ignoriere Fehler<j>? ja

Rückschreiben erzwingen<j>? ja

Lesefehler - Block 335020075 (Attempt to read block from filesystem resulted in short read) während beim Lesen des nächsten Inodes. Ignoriere Fehler<j>? ja

Rückschreiben erzwingen<j>? ja

Durchgang 2: Prüfe Verzeichnis Struktur
[...]


fsck finds a lot of errors and corrects them, and again there are
entries in the syslog. One thing this tells me is that it´s required
to always run fsck after creating a filesystem. Since the errors seem
to be somewhat intermittent and the problem is with arbitrary sectors,
it might still be a problem with the USB cable or the enclosure.

I´ll try with ext2 and see what happens ...


Reply to: