Input/output error - is the disc bad?

andy baxter andy at
Mon Sep 10 06:42:49 UTC 2007

Craig Hagerman wrote:
> Hi,
> I decided to move the data from one hard drive onto a new, much larger 
> drive. I first just simply used cp (cp -a olddir newdir). But I found 
> a dozen or so errors all the same complaining about an input/output 
> error. I tried rsync but it gave the same errors. I unmounted the disc 
> and ran fsck. Then, in order to see what exactly is different I did a 
> comparison like this:
> cd /media/OLD
> find . -type f -not -exec cmp {} /media/NEW/{} ";" -print
> It too gave me a bunch of input/output errors. Fsck found a couple 
> problems with inode numbers or something like that but didn't report 
> anything major. But it seems impossible to copy these files or even 
> read them. One is a documentary movie. I tried to watch it in mplayer 
> and it seemed to play fine, but as I fast forwarded through it, it 
> eventually came to a spot where it just froze up for a couple minutes 
> and then quit. I thought I had watched this video before and it was 
> OK, but I am not 100% sure.
> 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?
> Craig
Try using the program 'badblocks'. You can specify whether to do a 
non-destructive (read-only) or a destructive (read-write) test.

More information about the ubuntu-users mailing list