using dd to duplicate disks/partitions of slightly different sizes - works?

Jerry McAllister jerrymc at msu.edu
Sat Dec 1 20:30:33 PST 2007


On Sat, Dec 01, 2007 at 10:29:15AM -0700, Steve Franks wrote:

> I've got two 160GB disks.  Different manufacturers, so different #
> bytes.  One is FreeBSD, the other blank.  I'd like to backup my system
> for the fastest possible recovery after a crash - move the plug and
> power up.  I have gmirrored before, but I just wanted to do a quick
> dd, since I don't want to abuse my cheapo powersupply (has 4 disks
> already on it).
> 
> Two questions:
> 
> (1) If I dd from the smaller to the larger, will it work?  What
> happens to the extra, say 5MB of unused space - will my partition info
> be messed up?
> 
> (2) If I dd from the larger to the smaller (df reports only 50% used
> anyway) is there a way to make sure there is no info in the 5MB at the
> end that will overflow the smaller, and again, will my partitions be
> ok?
> 
> The other option is just to fdisk & label the other disk, then rsync
> everything to it.  Is that the wiser choice?

Either rsync or dump/restore.   skip the dd.  It is not a good use of dd.

////jerry

> 
> Thanks,
> Steve
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"


More information about the freebsd-questions mailing list