Date: Tue, 14 Mar 2000 14:54:07 -0500 (EST) From: John Baldwin <jhb@FreeBSD.org> To: Ken Bolingbroke <hacker@bolingbroke.com> Cc: Peter Radcliffe <pir@pir.net>, freebsd-questions@FreeBSD.org Subject: Re: disk cloning (& a bit of picobsd) Message-ID: <200003141954.OAA27971@granger.mail.mindspring.net> In-Reply-To: <Pine.BSF.4.21.0003100905030.66391-100000@fremont.bolingbroke.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <shame>NT</shame>. 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 <jhb@FreeBSD.org> -- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003141954.OAA27971>