Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jan 2007 13:38:59 -0600
From:      "Rick C. Petty" <rick-freebsd@kiwi-computer.com>
To:        Michael Knoll <michael.knoll@gmail.com>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: Recommended gmirror solution with swap?
Message-ID:  <20070102193859.GA83431@keira.kiwi-computer.com>
In-Reply-To: <975053160612310913t3dadcc02yfac58f6fbf0a49df@mail.gmail.com>
References:  <975053160612310913t3dadcc02yfac58f6fbf0a49df@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Dec 31, 2006 at 12:13:28PM -0500, Michael Knoll wrote:
> I am planning on converting my FreeBSD machine to use gmirror on two
> 40gig drives.  Reading the handbook and other sites with instructions
> on configuring gmirror, I notice they all disable swap.  Is this
> acceptable?  Is it expected swap be on another drive?  If so, is there
> a solution which I can keep the swap on the mirror. as I don't have
> another drive?

I've not had much luck using any of those instructions.  Instead, I opted
to mirror the entire drive, the equivalent of:

gmirror label -vb round-robin gm0 ad0
gmirror insert -v gm0 ad1

followed by an "fdisk", a "bsdlabel", and a number of "newfs"es.

This was relatively easy to do without using the boot CD, even if you
don't have a third drive to install from:

(assuming you've booted from ad0)

gmirror label -vb round-robin gm0 ad1
fdisk -B mirror/gm0
bsdlabel -Bw mirror/gm0s1
bsdlabel -e mirror/gm0s1

* modify label accordingly, then: *

newfs /dev/mirror/gm0s1a
newfs -U /dev/mirror/gm0s1d
...

followed by mounting the filesystems from the mirror (and creating the
necessary mountpoints, of course), then I'd do an installworld as per the
instructions in /usr/src/UPDATING onto the separate (mirrored) partition.

I wouldn't disable all swap (for various reasons).  Having the swap
partition mirrored with the rest of the disk isn't a bad thing-- it ensures
the integrity of crashdumps.

-- Rick C. Petty



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070102193859.GA83431>