0

I have a 750GB hdd that had a problem, so I rescued the data using ddrescue. I didn't think much of it and created the rescue using a much bigger (2TB) drive.

sudo ddrescue -f /dev/sda /dev/sdc ddrescue.log

Afterwards I discovered that the 750GB drive was damaged and would need to be replaced. I bought a new 750GB and now have no idea what to do. How can I move the data from the intermediate drive without creating a 2TB image?

  • I realize that if I had used an image instead of a drive in the destination argument, I wouldn't be in this predicament. `sudo ddrescue -f /dev/sda image.img ddrescue.log' – Christopher Powell Oct 26 '16 at 20:20
  • 1
    Can you use gparted on /dev/sdc to shrunk the partition back to size? – Darius Oct 26 '16 at 20:25
  • @Darius - Not too sure using gparted would help... The command I used took all the partitions (and data etc) found on sda and placed them all exactly on sdc. sdc is now left with one addition "Free Space" allocation of 1.3 TB. – Christopher Powell Oct 26 '16 at 20:59
  • i'm no expert, but, so what if the intermediate drive says there is lots of space available? Surely the important thing is what happens if you ddrescue from your intermediate drive to your new 750GB drive? does it work and if not then what happens? – barlop Oct 26 '16 at 21:16
  • You write "I realize that if I had used an image instead of a drive in the destination argument, I wouldn't be in this predicament. " <-- I think it wouldn't make much difference. You'd have an image that is built for a 750GB drive. Also this may be of interest askubuntu.com/questions/194962/… – barlop Oct 26 '16 at 21:18
1

As long as your source drive is the same size as your destination drive then even if you use a larger intermediate drive, it will still work fine no problems. So in the case of using an intermediate drive as you are, you copy(ddrescue), from source to intermediate and then another ddrescue command copying from intermediate to destination. And regardless of intermediate drive or not, I suggest in this day and age and even well over a decade before it, adding -b 1M (similar with dd), to speed up the copying so ddrescue doesn't default to its stoneage default of a 512 byte buffer. Here are some example usages GNU ddrescue - can someone give me a good command to run in terminal? but yours seem fine just add a -b 1M to what you have, for speed.

I'd guess that it will copy bit for bit everything from source to dest until it reaches the end of source or dest, then it will stop the copy completely. In the case of copying where src=your big intermediate drive, onto dest, your src disk is bigger than your dest disk. It will stop at the end of your dest disk. And that should be fine 'cos that's everything you want from your src disk anyway. And the stuff on your src disk(intermediate disk) is built to work on your dest disk(a disk that size), so i'd guess with my almost zero expertise so FWIW, that it should work nicely. (aside from any data corruption from your old bad disk)

You may find this of interest too https://askubuntu.com/questions/194962/mounting-ddrescue-image-after-recovery-in-over-my-head or anything about reading an image before even writing to a drive.

But just try it and see. I think you'll find that your copy, originalsrc to intermediate , and intermediate to dest, where src and dest are the same size and intermediate is big, will work fine. And ddrescue does provide a progress bar, which is good.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.