HD with bad sectors

leSLIe

Fisting is Too Mainstream for Me
Joined
Oct 18, 2004
Messages
13,980
I have an old 1TB backup hard drive that's full with work files, and HDTune has detected several bad sectors, so I need to copy the files to a new HD.

Is there a program that tells you which files are on those bad sectors? In order to avoid copying those files and to also know what I have lost?
 
Apart from that, should I run another HD program, like CHKDSK before copying? Hmm...
 
Its a gamble, chkdsk could correct things, it could also find even more bad sectors. I would first try to copy what you can off of it, then try chkdsk and see what happens.
 
I have an old 1TB backup hard drive that's full with work files, and HDTune has detected several bad sectors, so I need to copy the files to a new HD.

Is there a program that tells you which files are on those bad sectors? In order to avoid copying those files and to also know what I have lost?

Not really, personally i'd suggest breaking out a linux environment of some kind (LiveCD/LiveUSB) and making an image of the thing using dd_rescue. dd_rescue will skip over bad sectors and leave zeroes in it's place, depending on settings.

From there you can mount the image and copy the files somewhere.
 
I second dd_rescue. It will be able to get what ever is readable off. You can run it multiple times forwards and back to have the highest chance of recovering your data.
 
I second dd_rescue. It will be able to get what ever is readable off. You can run it multiple times forwards and back to have the highest chance of recovering your data.

This is what I use at home and work. Just had a successful mirror of a dying SSD last week at work.
 
Last edited:
Its a gamble, chkdsk could correct things, it could also find even more bad sectors. I would first try to copy what you can off of it, then try chkdsk and see what happens.

chkdsk could make things worse so I would definitely only use that on the copy.
 
Not really, personally i'd suggest breaking out a linux environment of some kind (LiveCD/LiveUSB) and making an image of the thing using dd_rescue. dd_rescue will skip over bad sectors and leave zeroes in it's place, depending on settings.

From there you can mount the image and copy the files somewhere.

OP said he wants to skip files in bad sectors in order to not copy corrupted files.
 
First of all, you should be careful when talking about ddrescue or dd_rescue. They are quite different. ddrescue usually refers to GNU ddrescue, which is a C++ program that is vastly superior to the dd_rescue shell script originally written by Kurt Garloff. There is little reason to use dd_rescue, since ddrescue is better in almost every way.

What's the difference between ddrescue, gddrescue, and dd_rescue?

Next, since the OP was asking about finding files that are corrupted due to bad sectors, ddrescue alone will not do the job. I agree that it would be smart to first image the drive with bad sectors to another drive using ddrescue. That should always be the first thing you do after you decide not to send the drive to a data recovery service. The next thing to do is to then image the image of the drive to a third drive. This is to give you a scratch drive to work with (for file recovery, fsck, etc.) while maintaining a "golden copy" (the second drive) that has as much intact data as possible from the original drive (which cannot be relied on since it could have sectors or the entire drive go bad at any time).

As for determining which files correspond to the bad sectors, I have seen ddrutility recommended for that purpose. I have not used it for that purpose, and it sounds like it is not the most robust tool for that purpose, but it is the only tool that I am aware of that tries to do this:

ddrutility / Wiki / Home
 
Be careful when using chkdsk. I've had it amplify a drive with more bad sectors once it picked up a few.
 
Why are you all recommending a complicated way to try to copy everything off?

Richcopy will work just fine.

And the dialogue window will show what files failed to copy, which is exactly what the OP stated they want to know.

Easy peasy and will work just fine.
 
Because ddrescue is more likely to recover more data than any filesystem-level copy. Even more so if the drive is not stable but is deteriorating with time and usage.
 
Why are you all recommending a complicated way to try to copy everything off?

Richcopy will work just fine.

And the dialogue window will show what files failed to copy, which is exactly what the OP stated they want to know.

Easy peasy and will work just fine.

If a drive has bad sectors then there's a chance that it's ready to go. One clean pass all the way through the disk is less stressful than a data copy and having the drive re-try the same bad sector several times before giving up. ddrescue can be configured to give up quickly on bad sectors.
 
Back
Top