gmirror existing installation?

Oliver Fromme olli at lurza.secnetix.de
Fri Jan 26 17:12:08 UTC 2007


Mike Jakubik wrote:
 > Oliver Fromme wrote:
 > > Oles Hnatkevych wrote:
 > > > There's a simple way of gmirroring existing installation.
 > > > 
 > > > > sysctl kern.geom.debugflags=16           # allow writing to a live filesystem
 > > > > gmirror label -v gm0 /dev/ad0
 > > > > # edit /etc/fstab, chane to /dev/mirror/gm0... slices
 > > > > # add "geom_mirror_load=YES" to /boot/loader.conf
 > > > > # reboot
 > > > > gmirror insert gm0 /dev/ad1
 > > 
 > > I don't recommend to do it that way.  It is better to first
 > > create the mirror on the second (unused) disk, label and
 > > newfs it, then copy the system from ad0 to gm0, then boot
 > > from gm0 on the second disk and insert the first disk into
 > > the mirror.
 > 
 > Exactly why is this better?

Because you don't overwrite the last sector of a partition
that contains an existing file system.  Overwriting that
sector might cause trouble depending on the layout of the
file system.

It's also a nice opportunity to change the layout (sizes)
of your partitons if necessary.  ;-)

 > It's certainly much more time consuming...

Not really much more.  It's true that you have to copy over
your files, but the computer does all that work itself.
You only have to type one command, then spend your time
doing something else.  You don't have to watch it during
the copying.  (You don't have to watch the mirror being
synchronized either, which has to be done anyhow and takes
much longer, probably.)

YMMV, of course.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, USt-Id: DE204219783
Any opinions expressed in this message are personal to the author and may
not necessarily reflect the opinions of secnetix GmbH & Co KG in any way.
FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"IRIX is about as stable as a one-legged drunk with hypothermia
in a four-hundred mile per hour wind, balancing on a banana
peel on a greased cookie sheet -- when someone throws him an
elephant with bad breath and a worse temper."
        -- Ralf Hildebrandt


More information about the freebsd-geom mailing list