I have troubles using an external harddisk connected via usb to my debian box.
I'm using Debian lenny 2.6.24-1-686 on a Dell Dimension 5150 (Pentium 4).
The Harddisk is a 750GB SATA Samsung Disk (which is denoted by lsusb as ID 13fd:1640 Initio Corporation Mass Storage) with one single partition on it. The Harddisk is mounted in a external case named BRAVO-T, which, as far as I understand, comes with a HD-controller. (Since the Harddisk itself, bought seperatly, is a Harddisk to be mounted into a PC tower)
lspci states that there are quite a few usb-controllers available:
Code:
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
03:02.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 61)
03:02.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 61)
03:02.2 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 63)
The VIA-Controller is a pci-card with four usb-connectors which I'm not using at the moment. The Intel-controllers are driven by uhci-hcd, except the last (USB2) one, which is driven by ehci-hcd.
The problem is that my filesystem gets screwed as soon as I start using it. I get loads of messages in /var/log/messages complaining about the sense key:
Code:
kernel: sd 3:0:0:0: [sdd] Add. Sense: No additional sense information
kernel: sd 3:0:0:0: [sdd] Sense Key : No Sense [current]
kernel: Info fld=0x0
Some files are not accessible, ls -l show the following output:
Code:
d????????? ? ? ? ? ? Mail
d????????? ? ? ? ? ? Matlab7
?rwsrwsrwt 65535 65535 65535 4294967295 1. Jan 1970 Posters
This is again from /var/log/messages after trying to remove a file on the filesystem:
Code:
kernel: attempt to access beyond end of device
iapbp100 kernel: sdd1: rw=0, want=14817127248, limit=1465144002
And this is from dmesg when trying to write onto the filesystem:
Code:
EXT3-fs error (device sdd1): ext3_new_block: Allocating block in system zone - blocks from 9437638, length 1
EXT3-fs error (device sdd1): ext3_new_block: Allocating block in system zone - blocks from 9437639, length 1
EXT3-fs error (device sdd1): ext3_add_entry: bad entry in directory #2039809: rec_len is smaller than minimal - offset=0, inode=16877, rec_len=8, name_len=0
EXT3-fs error (device sdd1): ext3_add_entry: bad entry in directory #2039809: rec_len is smaller than minimal - offset=0, inode=16877, rec_len=8, name_len=0
EXT3-fs error (device sdd1): ext3_add_entry: bad entry in directory #2039809: rec_len is smaller than minimal - offset=0, inode=16877, rec_len=8, name_len=0
I can still kind of use the harddisk, some files don't complain at all and work very well, others just don't, and some do sometimes and sometimes not. It happened as well that the filesystem started to confuse names and certain files or directories suddenly insisted of having the contents of other files or directories.
I tried e2fsck, which found loads of errors on the device (and attempted to correct them, stating success, started over by itself and found the same errors again), and in the end reformatted the whole disk, but no improvement.
I know this post is a little bit messy with code taken from different commands and files, but since the problem is showing itself all over the place this is all I could do.
Any ideas? Is it a problem of the file-system? Of the usb-controller? Of the (notably freshly bought) harddisk?