Input/Output error

Brian McKee brian.mckee at
Tue Oct 21 21:17:24 UTC 2008

On Tue, Oct 21, 2008 at 4:56 PM, Alain Muls <alain.muls at> wrote:
> Hi
> I have got a USB connected drive which crashed recently. I can still mount its
> partitions, but for certain directories and files, I get an Input/Output error.
> How can I diagnose this further and what action should I unertake to clean up
> the disk.

I think the first question is - do you care about the files and
directories you can't currently read?  Or are you just trying to
decide if it's ok to keep using that hard drive?  e.g. do you know it
was hardware failure or something like unplugging it while writing to
it that baffed those files?

Assuming the hardware is ok and you are serious about attempting to
recover data, then *first thing* made an image of the disk and put the
original away somewhere until you are done.

I believe the tools you want are dd_rescue and/or ddrescue.  There
have been threads on this issue in the last couple of months on this
mailing list that might help get you started too.

If it's drive health you are worried about, Smartmontools can help
determine the health of the hard drive.  There's a doc on the
smartmontools website that explains how to determine where the bad
spots are on a drive and write zeros to them, which usually prompts
the harddrive itself to mark those areas unusable in the future.

The manufacturer's usually have applications that will attempt to
determine the health of the drive and mark bad areas bad, but they
don't attempt to recover data either.

Spinrite is a commercial application that attempts to recover data
from bad areas on a harddrive.

In almost all of these cases I think you'll have to remove the drive
from the USB case to diagnose it properly.


More information about the ubuntu-users mailing list