From owner-freebsd-questions Tue Mar 14 11:55: 5 2000 Delivered-To: freebsd-questions@freebsd.org Received: from granger.mail.mindspring.net (granger.mail.mindspring.net [207.69.200.148]) by hub.freebsd.org (Postfix) with ESMTP id 27B6937B5AD for ; Tue, 14 Mar 2000 11:54:50 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from john.baldwin.cx (user-2ivess9.dialup.mindspring.com [165.247.115.137]) by granger.mail.mindspring.net (8.9.3/8.8.5) with ESMTP id OAA27971; Tue, 14 Mar 2000 14:54:33 -0500 (EST) Message-Id: <200003141954.OAA27971@granger.mail.mindspring.net> X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Tue, 14 Mar 2000 14:54:07 -0500 (EST) From: John Baldwin To: Ken Bolingbroke Subject: Re: disk cloning (& a bit of picobsd) Cc: Peter Radcliffe , freebsd-questions@FreeBSD.org Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 10-Mar-00 Ken Bolingbroke wrote: > > Redirected from -stable to -questions. > > On Fri, 10 Mar 2000, 'Peter Radcliffe' wrote: > >> Disk cloning with dd is evil. Don't Do That. >> >> My recommendation is to partition the disk as you desire, newfs and mount >> the partitions then use >> cd /new/partition; dump 0f - /original/partition | restore rf - > > Is there a particular reason you say dd is evil for disk cloning? I admin > a lab full of machines with various OS flavors. The PCs especially serve > multiple duty running FreeBSD, Linux, or NT. When the > machines get trashed, or I have a sudden need for extra machines of a > particular configuration, it would be nice to have a easy way to clone the > disks and restore things. I do this all the time with my own custom picoBSD floppy. That way I don't have to unplug any drives and can just do it all over the network. The image for the floppy is on my webpage (URL below). It works quite well. > As it happens, I do have access to a hardware disk cloner, which is way > cool. But that means I have to A) maintain a master disk for each > configuration, and B) take the drives out of each machine and plug them > into the disk cloner. Both of these are somewhat undesirable. Using dd(1) to do it does work best when the geometries are the same. > So I've been envisioning something where I can maintain compressed master > copies of each configuration on a humonguous disk on the lab server, then > when I want to restore/change a specific machine, I insert a boot floppy > that reads the image off the server and writes it to disk. Bingo, a fresh > new machine, ready to use! > > My initial tests with 'dd if=/dev/rwd1 bs=32k | gzip -9 > /bigslice/fbsd.dsk' then a corresponding 'gzcat /bigslice/fbsd.dsk | dd > of=/dev/rwd1 bs=32k' look promising. And best of all, it's OS-neutral. I > don't have to worry about how to create NT partitions and write to NTFS or > any of that crap. Just clone the whole disk and be done with it. That works, but it takes time. I actually clone over the partition table, and then the actual slices (/dev/wd0s1 for example) so that I can partition only 1.5 gig for example out of 10 gig on the hard drives in the lab. Then I only have to copy over 1.5 gig instead of the full 10 gig, which speeds up the process by a factor of 6. > So is this bad, evil even? Nope, not if done properly. > And back to that thing about making a boot floppy...is it just me, or does > 3.4-STABLE's source code not build a picobsd 'net' boot floppy? I make > the floppy image, write it to floppy, then boot up on it and the boot > loader craps out with errors I don't recall at the moment. Repeatedly > banging my head on it didn't help a whole lot, altho I noticed that midway > through my attempts, CVSup brought in new stuff that changed the whole > thing somewhat dramatically. I sorta thought -STABLE would be, well, > stable, but doesn't seem to be the case for picobsd... picoBSD is very much in a state of flux at the moment. -- John Baldwin -- http://www.cslab.vt.edu/~jobaldwi/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message