best approach to clone a disk?

Jerry McAllister jerrymc at clunix.cl.msu.edu
Wed Feb 15 13:10:07 PST 2006


> 
> > Thanks Steve, but this is exactly the same script I've been using all  
> > along, while in Single User Mode.
> > 
> > However, could you explain the zeroing of blocks, and what its  
> > purpose is for? Does this solve the problem of space being lost when  
> > cloning a disk to a larger disk?
> 
> Hi Joe
> 
> 
> Don't worry Joe, you are very very close
> 
> Regarding zeroing empty or unused blocks, have a look at this
> 
> http://www.digitalissues.co.uk/html/os/misc/partimage.html#22

If you use dump/restore, this does not apply at all.
Dump/restore goes by file nodes and uses only the existing files 
starting with the base of the file system directory structure and 
will not write out anything that is not in the current file tree.

Unless you are doing some experiment with sector mapping or some such,
you don't really want to do a binary clone of a disk or file system.
You want an functionally exact copy of the file system regardless of
the size or geometry of the receiving disk.   Dump/restore will give
you that and the other cloning utilities such as thag G4... or even dd
will not do that.

////jerry


> 
> Regarding space lost cloning to a larger disk, zeroing unused blocks wont help that.  Imagine your
> 10GB FreeBSD hard disk is cloned with G4U to a 20GB hard disk.  It will probably work great but
> your 20GB disk is only half full.  You will have to use growfs to expand a slice or create a new
> partition to reclaim the empty space. Sorry, I have not tried this yet and have no experience.
> 
> In cloning to a bigger disk, I prefer the dump/restore script method as I get to fully utilize the
> larger disk capacity
> 
> I hope this helps
> 
> Take care
> 
> Steve
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> _______________________________________________
> 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