Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Looks like my USB HDD is old and corrupted:

rsync: read errors mapping "path/to/file.jpg": Input/output error (5)


kernel: [58927.940676] sd 6:0:0:0: [sdb] Unhandled sense code
kernel: [58927.940683] sd 6:0:0:0: [sdb]  Result: hostbyte=invalid driverbyte=DRIVER_SENSE
kernel: [58927.940690] sd 6:0:0:0: [sdb]  Sense Key : Medium Error [current] 
kernel: [58927.940696] sd 6:0:0:0: [sdb]  Add. Sense: Unrecovered read error
kernel: [58927.940703] sd 6:0:0:0: [sdb] CDB: Read(10): 28 00 00 21 f2 df 00 00 08 00
kernel: [58927.940716] end_request: critical target error, dev sdb, sector 2224863

The strange thing is that FS is not spoilt: I can list all directories. However, reading the contents of about 10% files gives these errors. Adiitionally, most of small files are safe, however, large files are all spoilt (corruption threshold is ~5MB).

How can it be? What options do I have to investigate & rescue the files? Can it be a driver issue? I can't believe that HDD damage could miss the FS metadata!

P.S. this HDD is perfidious: I have always been doing backups, and it waited for the right moment to betray :-D

share|improve this question
I'm sure you'd get more answers if you added a hat to your Gravatar. – Ward Dec 17 '11 at 20:58
THE RESULT: ddrescue did the job, managed to minimize the number of errors – kolypto Dec 29 '11 at 20:51
up vote 6 down vote accepted

Listing the directories does not mean that the filesystem is ok, you're just viewing metadata (which is a small percent of a filesystem).

  1. Create a backup of everything you can
  2. Run a filesystem check (fsck)
  3. Create another backup (in case fsck managed to save some more files)
  4. Replace the disk
share|improve this answer
True. However, I can't believe such massive "damage" (whatever) could miss the metadata :) Already trying your suggestion, 10x! – kolypto Dec 17 '11 at 18:52
Metadata isn't spread out over the file system, it's a reserved place on the disk (I can't remember where right now) – pauska Dec 17 '11 at 19:07
I have no idea what you wrote, but I like your hat. – Wesley Dec 18 '11 at 1:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.