Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm currently having a close call with a hard lesson!

My 2TB WD Green drive started throwing bad blocks after a year of service. I have recovered all but 82kb of data to an image on a spare 3TB drive using the following commands:

ddrescue --no-split /dev/sda1 /media/store1/store1.img /media/store1/store1.log

Then I ran

ddrescue --direct --max-retries=3 /dev/sda1 /media/store1/store1.img /media/store1/store1.log

Followed by

ddrescue --direct --retrim --max-retries=3 /dev/sda1 /media/store1/store1.img 

I have another empty 3TB drive which can be used for a restore. But I'd quite like some advice first, as this recovery has taken 3 solid days and I wouldn't want to screw it up!

From what I understand, I could restore the image to a disk and then repair the copied bad blocks.. Would that be correct?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Since you didn't copy the whole disk but only the first partition, you have to recreate the partition table first. If you have both drives in your box at the same time, you can use something like this: http://askubuntu.com/questions/57908/how-can-i-quickly-copy-a-gpt-partition-scheme-from-one-hard-drive-to-another Otherwise, just note down the parameters and recreate them exactly on the second drive.

Then you dd your image back onto the first partition of the new drive (no point using ddrescue here). You should run an fsck after that, in case the bad block was in the file system. If it was in the files itself, you can find out which one using the original drive as described here: https://wiki.archlinux.org/index.php/Find_File_that_Owns_a_Given_Block.

share|improve this answer
    
Perfect! Thank you. –  MrNorm Jan 16 '13 at 12:55
add comment

Your Answer

 
discard

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.