Recommended gmirror solution with swap?

Gary Palmer gpalmer at freebsd.org
Mon Jan 1 21:25:42 PST 2007


On Mon, Jan 01, 2007 at 07:07:59PM +0100, Ivan Voras wrote:
> 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?
> 
> There's no technical problem with it, it's more a matter of organization
> and convenience. For example: you don't really need the swap to survive
> a crash, so there's no need to introduce the overhead of mirroring it -
> better to leave 2x the space configured as swap area. If you have more
> than one area, the system should take advantage of it and use both to
> maximize speed (in theory this should work as an implicit RAID0 across
> the swap areas).

Except in the case where a drive holding some swapped out memory goes bad
and the system panics or crashes as a result.  It might not make as
much sense for desktops, but if I were (still) building servers I'd
mirror everything that the system depended on to run.


More information about the freebsd-geom mailing list