RAID1 with gmirror

Paul Mather paul at
Mon Oct 11 08:56:44 PDT 2004

On Mon, 11 Oct 2004 14:26:06 +0100, Chris Elsworth <chris at>

> So, I'm left quite unsure whether the warnings are harmless or not.
> Pawel, can we just use existing labels on disks and apply a gmirror
> over it, or should we be re-labelling inside the mirror device?

I believe it is safer to re-bsdlabel the mirror device rather than use
an existing disklabel.  Remember, the mirror device uses one sector at
the end of each provider to store its metadata.  So, if you use the
existing provider's disklabel, you will at the very least get complaints
concerning the label about the "c" partition extending past the end of
the device (because the "c" partition will be one sector too long now).

Also, if you are unlucky, the mirror metadata might overwrite (and
render inaccessible) a sector's worth of actual filesystem data in the
last sector from the original provider when you create the mirror.  That
could cause problems.

Labelling the mirror device ensures that filesystem data is not on any
inaccessible sectors (assuming you don't deliberately create an invalid
label on the new mirror device:).

FWIW, I outline in a posting to freebsd-geom the steps I took to do a
fresh install of FreeBSD 5.3-BETA to create an root-on-gmirror setup
(  A similar technique could be used to gmirror an existing setup.


e-mail: paul at

"Without music to decorate it, time is just a bunch of boring production
 deadlines or dates by which bills must be paid."
        --- Frank Vincent Zappa

More information about the freebsd-current mailing list