A couple of days ago I attached an USB hard disk (it's SATA) to a remote server (fedora 13) I formatted it it ext3 before, and everything seemed to work for a couple of days. This morning, when I cd'd to it's directory and tried to ls, I got the following error:
ls: reading directory .: Input/output error
So I checked the logs. I initially attached it as sdb1, though I used /dev/disk/by-id/whatever. This is that first attachment:
Code:
Feb 15 10:18:04 linux kernel: sdb: sdb1
Feb 15 10:18:04 linux kernel: sd 2:0:0:0: [sdb] Assuming drive cache: write through
Feb 15 10:18:04 linux kernel: sd 2:0:0:0: [sdb] Attached SCSI disk
Feb 15 10:20:45 linux kernel: EXT3-fs (sdb1): using internal journal
Feb 15 10:20:45 linux kernel: EXT3-fs (sdb1): mounted filesystem with ordered data mode
This is when I noticed the problem.
Code:
Feb 17 09:01:26 linux kernel: EXT3-fs error (device sdb1): ext3_find_entry: reading directory #2 offset 0 (a bunch of errors likes this)
Feb 17 09:58:07 linux kernel: EXT3-fs error (device sdb1): ext3_get_inode_loc: unable to read inode block - inode=2, block=1027
Feb 17 09:58:07 linux kernel: EXT3-fs (sdb1): error in ext3_reserve_inode_write: IO failure
Feb 17 09:58:13 linux kernel: journal_bmap: journal block not found at offset 9444 on sdb1
Feb 17 09:58:13 linux kernel: Aborting journal on device sdb1.
Feb 17 09:59:24 linux kernel: EXT3-fs error (device sdb1): ext3_find_entry: reading directory #2 offset 0
Feb 17 10:02:01 linux kernel: EXT3-fs (sdb1): error: ext3_put_super: Couldn't clean up the journal
Feb 17 10:02:01 linux kernel: EXT3-fs (sdb1): error: remounting filesystem read-only
I did umount /dev/disk/by-id/diskid (where diskid is it's id).
Then I did mount /dev/disk/by-id/diskid and it mounted properly, but /dev/disk/by-id/diskid was now linked to sdc!
So, I grep'ed sdc in /var/log/messages, and I found these curious logs. Check the time. It happened at 23:15 on Feb 16, while the disk was mounted as /dev/sdb!
Code:
Feb 16 23:15:27 linux kernel: sd 3:0:0:0: [sdc] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
Feb 16 23:15:27 linux kernel: sd 3:0:0:0: [sdc] Write Protect is off
Feb 16 23:15:27 linux kernel: sd 3:0:0:0: [sdc] Assuming drive cache: write through
Feb 16 23:15:27 linux kernel: sd 3:0:0:0: [sdc] Assuming drive cache: write through
Feb 16 23:15:27 linux kernel: sdc: sdc1
Feb 16 23:15:27 linux kernel: sd 3:0:0:0: [sdc] Assuming drive cache: write through
Feb 16 23:15:27 linux kernel: sd 3:0:0:0: [sdc] Attached SCSI disk
Any ideas what caused this? This is a remote server, so I didn't have a chance to see what's actually going on with the USB enclosure, if it's power on and such.
fsck.ext3 /dev/sdc1 was clean, and e2fsck -f /dev/sdc1 looks fine as well.
Any tips and ideas would be much appreciated,
Dejan