[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Mirror Image?



On Wed Oct 30 2002 at 10:22, Alex wrote:

> Content-Type: text/html; charset=us-ascii

Please, no html to mailing lists, please?

> I whish to make a mirror image of hda that can be used in a second
> computer as the bootable hda..
> 
> Is there a utility for this ?

Yes, /bin/cat  (really:)

Actually, there are many ways to do it, what I describe here is one
option.

(All this assumes that the two drives that you are using are
*exactly* the same size.  If not, then copying the raw disk or
partitions will not work as expected).

If it was simply to mirror one disk to another on the same system,
then:
	cat /dev/hda > /dev/hdb

(ok, some "purists" will recommend dd, but cat also works fine).

If you want to mirror this onto another box over a network link, it
is almost as easy to do.

Boot the second box into linux, perhaps from the installer's rescue
mode, tomsrtbt (www.toms.net) or any of many other "tiny linux"
distros that can boot from floppy or cdrom.

The only criteria that is needed is that networking must be
available to allow you to talk to the "parent" box over the wire,
and that the netcat utility is available (/usr/bin/nc - it has a man
page).  Beware, the netcat (nc) rpm is not installed by default so
you might need to do that.

Now you can mirror the drive like this:

On the main box that want to mirror:

# nc -v -l -p 3333 < /dev/hda

and on the box you are mirroring to:

# nc -v -w 5 192.168.2.2 3333 > /dev/hda

(where the IP belong to the main box).

That will create the mirror.  After it is done, simply reboot the
box and it is likely to come up complaining of a dirty shutdown
(that's ok, since it was copied from a running system).

> Thanks, alex

As I say, this is only _one_ way it can be done.  But it works very
nicely.

Cheers
Tony





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]