Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 Feb 2006 18:48:56 -0600
From:      Kevin Kinsey <kdk@daleco.biz>
To:        Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Using dd to Make a Clone of a Drive
Message-ID:  <43EBE2F8.8000501@daleco.biz>
In-Reply-To: <20060209220123.GA4751@flame.pc>
References:  <200602092036.k19KaIhn086956@dc.cis.okstate.edu> <20060209220123.GA4751@flame.pc>

next in thread | previous in thread | raw e-mail | index | archive | help
Giorgos Keramidas wrote:

>On 2006-02-09 14:36, Martin McCormick <martin@dc.cis.okstate.edu> wrote:
>  
>
>>	After installing FreeBSD5.4, the ISC dhcp server and ISC bind
>>on a hard drive, I wanted to clone that drive to a second drive so as
>>to generate a second server, using what I had already installed as a
>>template.  I used the following command:
>>
>>dd if=/dev/da0 of=/dev/da1 bs=512
>>
>>	It turns out that dd defaults to 512-byte blocks so I didn't
>>really need the bs=512, but I am not sure I haven't made some other
>>type of mistake.  The dd command has been running for about 4 hours on
>>a very fast system, with a 1-gig processor, 1 gig of RAM and two 31-GB
>>drives.  One would think it should have finished by now, but it is
>>still running.  Is this a valid method of copying the entire contents
>>of one drive to another?  Thank you.
>>    
>>
>
>Bah!  That's too slow for my taste.  I would usually go for a newfs,
>dump, and restore option.  For instance, to create a copy of /usr on a
>second disk:
>
>    newfs -U /dev/ad1s1a
>    mount /dev/ad1s1a /mnt
>    dump -0 -a -L /usr | ( cd /mnt ; restore ruvf - )
>
>Copying with dd(1) is not as fast :)
>
>  
>
Sorry to butt in --- but I'm needing to start cloning too.  Looks
like a winner to me ... wouldn't this have the added advantage 
of making "same size and geometry" (cf. Erik Trulsson, 4 hours ago,
this thread) less relevant?

As long as the "new" slice had enough space, geometry shouldn't
matter to dump|restore ....  <?>

Kevin Kinsey


-- 
A committee is a group that keeps the minutes and loses hours.
		-- Milton Berle





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43EBE2F8.8000501>