Recommended gmirror solution with swap?
Rick C. Petty
rick-freebsd at kiwi-computer.com
Tue Jan 2 11:40:54 PST 2007
On Mon, Jan 01, 2007 at 07:07:59PM +0100, Ivan Voras wrote:
> 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).
Mirror the whole disk, but instead of having /etc/fstab use
/dev/mirror/gm0s1b as a swap device, have it use both /dev/mirror/ad0s1b
and /dev/mirror/ad1s1b.. Since gm0s1b isn't used, there shouldn't be a
problem referencing the underlying device nodes =)
I'm sure the current implementation does not allow for this, but I can't
see any reason why this shouldn't be *allowed*. However, it may not be
*possible* because AFAIK there's no way in GEOM for bsdlabel to tell its
provider (gmirror) that certain portions aren't in use, so the whole
devices (ad0 and ad1) are being fully consumed.
An interesting idea though...
-- Rick C. Petty
More information about the freebsd-geom