Recommended gmirror solution with swap?
Rick C. Petty
rick-freebsd at kiwi-computer.com
Tue Jan 2 19:33:25 UTC 2007
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
More information about the freebsd-geom
mailing list