Input/output error - is the disc bad?
ubuntu at tigershaunt.com
Mon Sep 10 02:57:57 UTC 2007
Craig Hagerman wrote:
> Any suggestions for how to successfully copy the dozen or so files that have
> the read error? Those files are not all THAT important, and I wouldn't care
> too much if I lost them. What I do care about is if the drive is bad or not.
> I was going to reuse it. Other than fsck how else can I check a (SATA) disc?
> How can I know if it is bad or not, or how I can I fix any problems so that
> I won't lose data again in the future?
Yup, the disk is bad
I would suggest doing all of the following while booted with a live cd,
If recovery of the data is important enough to be worthwhile, you can
use dd_rescue to dump an image copy of the bad drive onto a good drive,
run fsck to fix filesystem errors, then proceed to copy the files from
the new image. There will likely be data loss/corruption from the bad
sectors however. There is probably no chance of recovering those files
Once you're finished with data recovery, use badblocks -n program (or,
alternatively, if you're sure you have all your data and don't mind
blanking the hard drive, badblocks -w) If the hard drive still has
enough room in it's reserved space to swap out the bad sectors, it will
on the write/read test, and the drive will appear good again. On the
other hand, if badblocks starts reporting bad sectors (you will see them
as just listing of numbers) then toss this drive out (or send off for
warranty, as the case may be.) Personally, I would just get rid of the
drive without bothering with the bad blocks... A hard drive that is
starting to deteriorate like that is all the more likely to get more bad
sectors in the future.
More information about the ubuntu-users