I received messages in /var/log/kern.log
that indicate drive failure. The messages occured while copying my $HOME
between drives (ext4 -> ext3):
[ 5733.186033] sd 4:0:0:0: [sdb] Unhandled sense code
[ 5733.186038] sd 4:0:0:0: [sdb] Result: hostbyte=invalid driverbyte=DRIVER_SENSE
[ 5733.186042] sd 4:0:0:0: [sdb] Sense Key : Medium Error [current]
[ 5733.186048] sd 4:0:0:0: [sdb] Add. Sense: Unrecovered read error
[ 5733.186053] sd 4:0:0:0: [sdb] CDB: Read(10): 28 00 05 b7 2e 40 00 00 08 00
[ 5733.186064] end_request: critical target error, dev sdb, sector 95891008
The messages come in bulks, this is one of those bulks. sdb
is the source drive.
How do I find out to which file/inode the sector belongs? I just want to know so I can recover the files in question from a backup. Anything faster than the following code plus a subsequent analysis of the output?
find . -type f -print \
-exec cp \{\} /dev/null \; \
-exec tail -n 1 /var/log/kern.log \;
OS: Ubuntu Oneiric.
EDIT: The command above also outputs to stderr
the files that could not be read.