Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Jan 2010 21:42:49 +0000
From:      Matthew Seaman <>
To:        Mike Clarke <>
Cc:        Pieter de Goeje <>,
Subject:   Re: Newbie gmirror questions
Message-ID:  <>
In-Reply-To: <>
References:  <> <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

Mike Clarke wrote:
> On Sunday 17 January 2010, Matthew Seaman wrote:
>> Mike Clarke wrote:
>>> Actually I was more concerned about what happens when I boot into
>>> another OS like Windows or Linux on one of the spare slices - I'm
>>> assuming that I have to apply gmirror to the whole disk rather than
>>> just selected slices?
>> You can't do this.  gmirror is FreeBSD specific, and other OSes can't
>> deal with it.  You can take your two drives, partition them (fdisk)
>> and then create a gmirror across the slices you assign to FreeBSD.
> This will make things a lot easier for me. I think all the examples of =

> gmirror I've seen used things like /dev/da0 as the provider in label=20
> commands so I assumed that I had to use the whole physical disk but if =

> I can mirror individual slices then I have much more flexibility.
> My motherboard has a UDMA133 controller for ata0 & ata1 (which I don't =

> use) and 2 SATA controllers for ata2 to ata5 so with my 2 SATA drives=20
> spread between the controllers on channels 2 & 4 I could have something=
> like /dev/mirror/gm1 provided by /dev/ad2s1 & /dev/ad4s1=20
> and /dev/mirror/gm2 provided by /dev/ad2s2 & /dev/ad4s2 for a couple of=
> FreeBSD systems. That will leave me with 2 spare slices on each drive=20
> for other purposes. Any Windows or Linux stuff I put on tends to be=20
> mainly experimental and less long term than my FreeBSD system so don't =

> really need the resilience of being mirrored.

Yes -- there's an On-Lamp article by Dru Lavigne that has been particular=
influential, and gmirror'ing whole disks is the best way forwards for the=

vast majority of cases where you've a server dedicated to one OS.

However, one of the really amazingly brilliant things about geom is that
just about any disk / storage related thing can be a geom provider, and=20
geom constructs will nest very happily.  Here's a howto for setting up
gmirror across a pair of slices:

It's fairly old now, but the essentials are still correct.  The one thing=

that has changed in the intervening time is what is the best algorithm
to use for the gmirror.  Up until the release of 8.0, 'round-robin' was=20
virtually always the right choice, but nowadays 'load' is preferred.
All that means, is change the following line in rse's article from:

gmirror label -v -n -b round-robin ${gm} /dev/${d2}s1


gmirror label -v -n -b load ${gm} /dev/${d2}s1



Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP:     Ramsgate
                                                  Kent, CT11 9PW

Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

Version: GnuPG v2.0.14 (FreeBSD)
Comment: Using GnuPG with Mozilla -



Want to link to this message? Use this URL: <>