Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Mar 2000 12:51:12 -0500
From:      'Peter Radcliffe' <pir@pir.net>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: disk cloning (& a bit of picobsd)
Message-ID:  <20000310125112.F2584@pir.net>
In-Reply-To: <Pine.BSF.4.21.0003100905030.66391-100000@fremont.bolingbroke.com>; from hacker@bolingbroke.com on Fri, Mar 10, 2000 at 09:21:29AM -0800
References:  <20000310115700.C2584@pir.net> <Pine.BSF.4.21.0003100905030.66391-100000@fremont.bolingbroke.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ken Bolingbroke <hacker@bolingbroke.com> probably said:
> Is there a particular reason you say dd is evil for disk cloning?  I admin

It can screw up partitioning, can waste space on the disk and can
generally mess up in weird ways and cause problems later for an unwary
admin.  The questioner seemed somewhat unwary.

> 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.

If you have an image taken from a particular machine and are putting it
back into the partition on that machine, dd can be fine, but you really
need to know what you're doing beforehand.

When I was conslutting I've had to rescue several people from bad
situations they got themselves in by thinking they could just copy the
contents of random disk A to random disk B with dd.

(mostly on sparcs where dd-ing the disk copies the disk label, so
their 9Gb disk has just gained the label from a 4Gb disk and they
don't actually see any extra space and wouldn't have any idea how to
re-label the disk even if they knew that was the problem...)

> 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.
> 
> So is this bad, evil even?

Thats somewhat different. I've heard about several similar systems
(but don't have any references for you, I'm afraid).  If you have
identical disks or are putting an image back on the same machine, no
problem ...

> 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...

changes will come into -STABLE. -STABLE is not guaranteed to always work.
If you want unchanging, use -RELEASE.

P.

-- 
pir                  pir@pir.net                    pir@net.tufts.edu



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?20000310125112.F2584>