sysinstall vs gmirror

perryh at perryh at
Mon Sep 13 04:24:36 UTC 2010

Matthew Seaman <m.seaman at> wrote:

> On 12/09/2010 05:09:04, perryh at wrote:
> > How do I get sysinstall to recognize a gmirror?
> > ...
> I don't think sysinstall will do what you want.

It certainly has been less than totally cooperative so far :(

> However, what is your ultimate goal?
> To install a system with a gmirror root drive?

No, to install a system with each of /, /usr, and /var mirrored and
journalled, with each journal kept in the same (mirrored) partition
as its FS -- diagram below.  IIUC, to put the journal in the same
partition with the FS I have to create the journal while the FS is
empty, hence before installing.  (This is all UFS -- 512MB seems a
bit small for ZFS.)

The plan after partitioning the mirror is to create the journals,
then install onto the journalled FS's, and finally to insert the
second half of the mirror after everything else is up and running.

> ... you can boot into the Fixit system, set up mirroring etc. and
> then work through the rest of the installation process by hand.
> The install sets are just split up tarballs and it's pretty easy
> to extract a copy of a system from them.

The part I don't know how to do is partitioning gm0 by hand.
(I suppose it would require some sort of arcane incantations
involving bsdlabel.)  For all its limitations, sysinstall
seems at least to know how to translate a reasonably human-
readable representation of the desired slice and partition
layout into the necessary fdisk and bsdlabel commands.

Someone suggested using the PC-BSD installer, which knows how
to do stuff like this, but when I asked how to do that from a
memstick (rather than from a CD or DVD) I didn't get an answer.

     ad0s2 FreeBSD             ad2s2 FreeBSD
      ad0s2a <----- gm0 ----->  ad2s2a
    gm0a.journal [gjournal label gm0a gm0a]  rootFS
    gm0d.journal [gjournal label gm0a gm0a]  /var
    gm0e.journal [gjournal label gm0a gm0a]  /usr 

There's more to it than this, but I think I know how to do the rest.
The current sticking point is getting the mirror partitioned.

More information about the freebsd-questions mailing list