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

Re: how to make a disc replica with dd ?



You can do this with dd as long as the target disk is BIGGER.  What will
happen is that the target disk will suddenly appear to be the exact same
size as the source disk.  Note also that you probably only want to do
this while in single-user mode, lest the disk be written to while you
are copying it!

An easier(?) way would be to use dump/restore.

Copying from /dev/wd0a (mounted on /) to /dev/wd1a would be, for
example:

    newfs /dev/wd1a
    mount /dev/wd1a /mnt
    cd /mnt
    dump -0 -f - / | restore -r -f -
    rm restoresymtable
    cd /
    umount /mnt

See dump(1) and restore(1) manpages for details.

-Adam Thompson
 athompso@commerced.com


----- Original Message -----
From: "Rick" <rick@diabolo.bru-noc.net>
To: <misc@openbsd.org>
Sent: Tuesday, March 13, 2001 10:42 AM
Subject: how to make a disc replica with dd ?


>
> Hello.
> I have just done a big job on a machine and I want to replicate the
whole
> disc on an other OpenBSD machine, not same disc but about same size.
> Can I do it with dd ??
> Which are the preferred block size I have to use ?
> Do I have to do simply
>
> dd if=/dev/wd0c of=/dev/wd1c
>
> being wd0 and wd1 my 2 disks ??
>
> Do I have to do it single user and no disc mounted rite ?
> OF course once this is succesfull the target disk will boot rite ?
>
> thanks
>
> Rick
>
>
>