From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 29 16:46:26 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B7EE16A422 for ; Wed, 29 Mar 2006 16:46:26 +0000 (UTC) (envelope-from lidl@meketrex.pix.net) Received: from meketrex.pix.net (meketrex.pix.net [192.111.45.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 798C343D6D for ; Wed, 29 Mar 2006 16:46:25 +0000 (GMT) (envelope-from lidl@meketrex.pix.net) Received: (from lidl@localhost) by meketrex.pix.net (8.11.6/8.11.6) id k2TGkLD13677; Wed, 29 Mar 2006 11:46:21 -0500 (EST) Date: Wed, 29 Mar 2006 11:46:21 -0500 From: "Kurt J. Lidl" To: Patrick Tracanelli Message-ID: <20060329164620.GC13469@pix.net> Mail-Followup-To: Patrick Tracanelli , freebsd-hackers@freebsd.org References: <44296F41.1050209@osoft.us> <4429972C.5030806@freebsdbrasil.com.br> <20060328.210412.18287651.imp@bsdimp.com> <200603291953.56112.doconnor@gsoft.com.au> <442A882B.8000207@freebsdbrasil.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <442A882B.8000207@freebsdbrasil.com.br> User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@freebsd.org Subject: Re: cloning a FreeBSD HDD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2006 16:46:26 -0000 On Wed, Mar 29, 2006 at 10:14:19AM -0300, Patrick Tracanelli wrote: > Daniel O'Connor wrote: > >On Wednesday 29 March 2006 14:34, M. Warner Losh wrote: > > > >>dump + restore is slow but reliabe. > > > >Faster than dd for disks that aren't full :) > > > >It also gives you a defrag as well as allowing you to change FS options. > > Yes, pretty much faster for non-full disks, even compared to paralell > dd(1). And we always have the "-L" option to snapshot and dump(1) from > live file systems, what makes it an interesting and completly viable > choice to clone the disks in multiuser mode (no need to go single user). In a prior life, I had to generate a bunch (50 or 60) disk images from a master server image. The server image was updated periodically, so we decided to always go for doing it on the fly, rather than just restoring a known-good dumpfile from some place. (Questionable in hindsight, but...) Anyhow, we were using SCSI disks, so I got a shelf full of scsi disk canisters (since we had standardized on a particular one) and then wrote a zsh script to do the dumping. Zsh has a particular ability to have it duplicate the contents of a single input stream to multiple output streams. So we would fire up one dump on the master disk, and then pipe the output to multiple copies of restore running (one per disk) simultaneously. It was way faster than doing them sequentially. And, impressive to watch the access lights on the drives when you were making seven disk drives copies at once... -Kurt