Using mdconfig for swap space

RW rwmaillists at googlemail.com
Wed Sep 9 00:03:33 UTC 2009


On Tue, 8 Sep 2009 16:51:20 -0500
Peter Steele <psteele at maxiscale.com> wrote:

> Are there any advantages to using mdconfig and creating a virtual
> disk for swap space as opposed to having a designated swap partition?
> For example, I could do something like this:
> 
> mdconfig -a -t swap -f /var/swap0 -s 4g
> swapon -a /dev/md0

FWIW that's already supported by adding  swapfile="/var/swap0" to
rc.conf

Your arguments are wrong BTW "-t swap" creates a device *backed* by
swap. And the size comes from the size of the supplied file - which you
typically create with dd.


More information about the freebsd-questions mailing list