From owner-freebsd-questions@FreeBSD.ORG Thu Feb 9 22:02:45 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 CD78416A420 for ; Thu, 9 Feb 2006 22:02:45 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1413143D48 for ; Thu, 9 Feb 2006 22:02:44 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (dialup200.ach.sch.gr [81.186.70.200]) (authenticated bits=128) by igloo.linux.gr (8.13.5/8.13.5/Debian-3) with ESMTP id k19M2847021528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 10 Feb 2006 00:02:14 +0200 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id k19M1Oro004791; Fri, 10 Feb 2006 00:01:24 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id k19M1NAO004790; Fri, 10 Feb 2006 00:01:23 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 10 Feb 2006 00:01:23 +0200 From: Giorgos Keramidas To: Martin McCormick Message-ID: <20060209220123.GA4751@flame.pc> References: <200602092036.k19KaIhn086956@dc.cis.okstate.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200602092036.k19KaIhn086956@dc.cis.okstate.edu> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.381, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.82, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr 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:02:45 -0000 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 :)