Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Trying to clone a failing disk with ddrescue

sudo ddrescue -r 3 /path/to/home /destination/ logfile

It's been running for about 10 days! Now it's Splitting failed blocks and hasn't read anything successfully for the past two days.

Is it safe to Ctrl+c ddrescue now? Will the so-far rescued image be usable if I do so?

share|improve this question
    
ddrescue has already done one pass, copied most parts of the drive. Now it's trying to split and copy failed blocks. Shouldn't it be safe to stop it without corrupting anything? –  ananth.p Jun 11 '12 at 6:17
    
So, Im concerned that, although the comments posted are useful. The actual question still remains unanswered: That is: Can i stop it now, and will I be able to access the rescued data if I stop it during the "Splitting Failed Blocks" phase? –  lemon Jun 10 at 2:25

2 Answers 2

This is from the ddrescue manual:

IMPORTANT! If you interrupt the rescue and then reboot, any partially copied partitions should be hidden before allowing them to be touched by any operating system that tries to mount and "fix" the partitions it sees.

share|improve this answer
    
Understandable. I'm booting from Live CD and won't mount the source partition automatically. I wouldn't want to disturb it. Rescued is the image file which won't be mounted automatically anyways. My worry is, since the ddrescue operation is incomplete, if I terminate now, will I be able to mount the rescued Image file at all? so that I could attempt extracting data from it. –  ananth.p Jun 11 '12 at 6:08
    
A cool feature of ddrescue is that you can stop and resume its activity. It will use the log file to pick up where it stopped last. I don't think you can mount the image file. –  Mitch Jun 11 '12 at 6:17

The command

fdisk -l /path/to/image  

will show you the block-size and the start-block of the partition. You can use that to calculate the offset. Say blocksize is 512 and start block is say 128; 512*128=65536

So 65536 is your offset you can then mount it with the command

mount -o loop,offset=65536 /path/to/image.img /mnt/tmp  

or whatever mount point you want mounted.

Job done.

share|improve this answer

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.