Can you successfully clone a Mac OS X boot volume directly to another larger volume with ddrescue?
Can you clone a Mac OS X boot volume (specifically a "Mac OS Extended, Journaled" a.k.a. JHFS+ volume) directly to another, larger volume using ddrescue
or even dd
, and have the target volume end up as a perfectly working, bootable volume?
In the past, I've used ddrescue
to make a raw .dmg backup of a Mac OS X boot volume of a dying hard drive, and then "restored" that .dmg to another volume via Disk Utility, but in this case I don't have the spare hard drive space to store the intermediate .dmg file, so I'll need to invoke ddrescue
to directly clone the dying volume to a new volume. But I'm nervous that using ddrescue to do this directly, rather than using Disk Utility for the restore portion, won't leave things set up correctly so the resulting volume won't be bootable.
I have to use ddrescue because I'm dealing with a failing hard drive again. SMART Utility says it has only a single pending bad sector out of a 500GB drive, so I feel like my odds of not having any critical data on that bad sector are pretty good. The part I'm worried about is whether a raw block-by-block clone of one volume to a slightly larger volume might not leave the target volume set up correctly somehow.
Has anyone done this before on Mac OS X and can vouch that it works?
Update: Had to post my own Answer ("No", or "Not in the way I tried"), but I'd be happy to Accept a different answer if someone else can provide instructions for successfully doing this.
So the answer appears to be either "No", or at least "Not in the way I tried". The resulting volume mounted once, but Disk Utility's "Repair Disk" said the filesystem structures had errors (incorrect b-tree sizes, perhaps?) that Disk Utility couldn't repair. I didn't have the ability to see if Disk Warrior or another tool could have fixed it. The failing source drive did not have these problems, so it was probably something about my ddrescue-based copying procedure that messed it up.
A friend of mine said he successfully cloned a whole drive (including partition table and everything) on a Mac using dd
, so it may be possible to clone a whole device this way, just not individual JHFS+ volumes.
Another thing that may have contributed to the failure is that I did not take the time to make the target partition exactly the same number of sectors/blocks as the source partition (the target was larger of course).