From owner-freebsd-questions Wed Oct 4 22:21:55 2000 Delivered-To: freebsd-questions@freebsd.org Received: from ducky.nz.freebsd.org (ns1.unixathome.org [203.79.82.27]) by hub.freebsd.org (Postfix) with ESMTP id 614E937B502 for ; Wed, 4 Oct 2000 22:21:52 -0700 (PDT) Received: from wocker (wocker.int.nz.freebsd.org [192.168.0.99]) by ducky.nz.freebsd.org (8.9.3/8.9.3) with ESMTP id SAA36181; Thu, 5 Oct 2000 18:21:05 +1300 (NZDT) Message-Id: <200010050521.SAA36181@ducky.nz.freebsd.org> From: "Dan Langille" Organization: langille.org To: Glenn Johnson Date: Thu, 5 Oct 2000 18:20:56 +1300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: more than one swapfile with vnconfig Reply-To: dan@langille.org Cc: freebsd-questions@FreeBSD.ORG In-reply-to: <20001004165235.A1487@gforce.johnson.home> References: <200010041018.XAA28539@ducky.nz.freebsd.org>; from dan@langille.org on Wed, Oct 04, 2000 at 11:18:49PM +1300 X-mailer: Pegasus Mail for Win32 (v3.12c) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 4 Oct 2000, at 16:52, Glenn Johnson wrote: > 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). Sorry, I wasn't clear. I should not write late at night (repeat 100 times). I already had one swap file (/usr4/swapfile) but this was insufficient. So I created another (/usr2/swapfile). My problem was trying to figure out how to specify both swapfiles withint the same /etc/vntab file. > 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. Now that is interesting. Thanks. For the time being, I've changed /etc/vntab to refer to the new swap file instead of the old swap file. I'll clean things up after BSDCon. Thanks. -- Dan Langille The FreeBSD Diary - http://www.freebsddiary.org/ FreshPorts - http://freshports.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message