From owner-freebsd-questions@FreeBSD.ORG Thu Feb 9 21:51:53 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 9090716A420 for ; Thu, 9 Feb 2006 21:51:53 +0000 (GMT) (envelope-from gayn.winters@bristolsystems.com) Received: from fed1rmmtao08.cox.net (fed1rmmtao08.cox.net [68.230.241.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F4F443D4C for ; Thu, 9 Feb 2006 21:51:50 +0000 (GMT) (envelope-from gayn.winters@bristolsystems.com) Received: from workdog ([68.5.182.86]) by fed1rmmtao08.cox.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060209214913.UKLT26964.fed1rmmtao08.cox.net@workdog>; Thu, 9 Feb 2006 16:49:13 -0500 From: "Gayn Winters" To: "'Martin McCormick'" , Date: Thu, 9 Feb 2006 13:53:53 -0800 Organization: Bristol Systems Inc. Message-ID: <07e501c62dc3$54b3f3f0$6501a8c0@workdog> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 In-Reply-To: <200602092036.k19KaIhn086956@dc.cis.okstate.edu> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal Cc: 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 Reply-To: gayn.winters@bristolsystems.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2006 21:51:53 -0000 > [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of > Martin McCormick > Sent: Thursday, February 09, 2006 12:36 PM > To: freebsd-questions@freebsd.org > Subject: Using dd to Make a Clone of a Drive > > > 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. At this point, let it run. There was a discussion last month on the hackers distribution list on "increasing dd disk to disk transfer rate"; it discussed larger block size, piping (dd if=... | dd of=...), and disk_recover. It is also possible to create your own distribution disk, which may be appealing if you do a lot of cloning. Finally, there is always backup|restore. As for speed, dd will probably be last in a race, especially with large, mostly empty, disks. -gayn Bristol Systems Inc. 714/532-6776 www.bristolsystems.com