From owner-freebsd-questions@FreeBSD.ORG Thu Feb 9 22:11:57 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2482C16A420 for ; Thu, 9 Feb 2006 22:11:57 +0000 (GMT) (envelope-from pauls@utdallas.edu) Received: from smtp1.utdallas.edu (smtp1.utdallas.edu [129.110.10.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E5E743D5F for ; Thu, 9 Feb 2006 22:11:54 +0000 (GMT) (envelope-from pauls@utdallas.edu) Received: from utd59514.utdallas.edu (utd59514.utdallas.edu [129.110.3.28]) by smtp1.utdallas.edu (Postfix) with ESMTP id AEFD2388E84; Thu, 9 Feb 2006 16:11:53 -0600 (CST) Date: Thu, 09 Feb 2006 16:11:53 -0600 From: Paul Schmehl To: Giorgos Keramidas , Martin McCormick Message-ID: <1E6BAC9C204AF5A44F26D5EA@utd59514.utdallas.edu> In-Reply-To: <20060209220123.GA4751@flame.pc> References: <200602092036.k19KaIhn086956@dc.cis.okstate.edu> <20060209220123.GA4751@flame.pc> X-Mailer: Mulberry/3.1.6 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: freebsd-questions@freebsd.org Subject: Re: Using dd to Make a Clone of a Drive X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2006 22:11:57 -0000 --On Friday, February 10, 2006 00:01:23 +0200 Giorgos Keramidas wrote: > On 2006-02-09 14:36, Martin McCormick 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 :) Have you tried dcfldd? sysutils/dcfldd It's both faster and more informative than dd. Cat the pkg-descr file. Paul Schmehl (pauls@utdallas.edu) Adjunct Information Security Officer University of Texas at Dallas AVIEN Founding Member http://www.utdallas.edu/ir/security/