Date: Wed, 4 Oct 2000 16:52:35 -0500 From: Glenn Johnson <glennpj@charter.net> To: Dan Langille <dan@langille.org> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: more than one swapfile with vnconfig Message-ID: <20001004165235.A1487@gforce.johnson.home> In-Reply-To: <200010041018.XAA28539@ducky.nz.freebsd.org>; from dan@langille.org on Wed, Oct 04, 2000 at 11:18:49PM %2B1300 References: <200010041018.XAA28539@ducky.nz.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 04, 2000 at 11:18:49PM +1300, Dan Langille wrote: > I'm trying to add yet more swap space to one of my boxes. I'm using > vnconfig. > > /etc/vntab contains this: > > /dev/vn0c /usr4/swapfile swap > > I created a new swap file using this command: > > dd if=/dev/zero of=/usr2/swapfile bs=15m count=20 > > I don't know how to specify the second swap file in the configuration > file. I'd like to use both the existing and the new swap file. > > clues please. Your vntab has /usr4/ but you created the file under /usr2/ so you may want to verify if that is correct. You can create the swapfile from vnconfig by the way, vnconfig(8). Anyway, assuming that /usr2/swapfile is where the file actually is, you would add the following to /etc/rc.conf: swapfile="/usr2/swapfile" Then, the following code from /etc/rc is activated: ----- # Add additional swapfile, if configured. # case ${swapfile} in [Nn][Oo] | '') ;; *) if [ -w "${swapfile}" -a -c /dev/vn0b ]; then echo "Adding ${swapfile} as additional swap." vnconfig /dev/vn0b ${swapfile} && swapon /dev/vn0b fi ;; esac ----- Hope that helps. -- Glenn Johnson glennpj@charter.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001004165235.A1487>