clone a drive, no raid involved

David Kelly dkelly at hiwaay.net
Thu Jun 19 16:50:33 UTC 2008


On Thu, Jun 19, 2008 at 12:08:34PM -0400, Brad Mettee wrote:
> I'm setting up a pair of machines with almost identical OS config, and
> completely identical hardware. One is a primary DNS server, the other
> is secondary. NS1 will also serve web, NS2 will be a mail server. Both
> are low volume/loads.
> 
> It looks like I can use DD to copy an entire drive, but it's a 500G
> drive and that's going to take a really long time (especially since
> it's brand new with no data besides base OS).

Yes dd(1) works, especially if the 2nd drive is equal size or larger
than the original.

> My question: Is there a better way to duplicate a drive including boot
> info?

Mount both drives on same machine, right? Then move one to the other?

I think you will find its not all that hard to build the 2nd machine
from install CDs. But it is a useful learning exercise to learn how to
clone a drive before all hell breaks loose and the whole world is
depending on you.

Study the man page for bsdlabel(8) and reproduce the configuration on
your 2nd drive that you see on your first.

Write the new filesystems with newfs(8).

Then for each filesystem (only showing / below):

	mount /dev/your-2nd-drive's-root /mnt
	dump -0aL -f - / | ( cd /mnt/ ; restore -r )

-- 
David Kelly N4HHE, dkelly at HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.


More information about the freebsd-questions mailing list