From owner-freebsd-questions Wed Oct 4 23:56:10 2000 Delivered-To: freebsd-questions@freebsd.org Received: from front001.cluster1.charter.net (24-216-159-200.hsacorp.net [24.216.159.200]) by hub.freebsd.org (Postfix) with ESMTP id ACF6D37B502 for ; Wed, 4 Oct 2000 23:56:06 -0700 (PDT) Received: from [24.216.138.99] (HELO gforce.johnson.home) by front001.cluster1.charter.net (CommuniGate Pro SMTP 3.3.2) with ESMTP id 639642; Thu, 05 Oct 2000 02:56:06 -0400 Received: (from glenn@localhost) by gforce.johnson.home (8.11.0/8.11.0) id e956u3l07189; Thu, 5 Oct 2000 01:56:03 -0500 (CDT) (envelope-from glenn) From: Glenn Johnson Date: Thu, 5 Oct 2000 01:56:03 -0500 To: Dan Langille Cc: Glenn Johnson , freebsd-questions@FreeBSD.ORG Subject: Re: more than one swapfile with vnconfig Message-ID: <20001005015602.A81801@gforce.johnson.home> Mail-Followup-To: glenn, Dan Langille , Glenn Johnson , freebsd-questions@FreeBSD.ORG References: <200010041018.XAA28539@ducky.nz.freebsd.org>; <20001004165235.A1487@gforce.johnson.home> <200010050521.SAA36181@ducky.nz.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200010050521.SAA36181@ducky.nz.freebsd.org>; from dan@langille.org on Thu, Oct 05, 2000 at 06:20:56PM +1300 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Oct 05, 2000 at 06:20:56PM +1300, Dan Langille wrote: > On 4 Oct 2000, at 16:52, Glenn Johnson wrote: > > > On Wed, Oct 04, 2000 at 11:18:49PM +1300, Dan Langille wrote: > > > > > 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. > OK, I understand now. I did not really catch the phrase "second swap file" above and thought you were just adding a swap file to the standard swap. You would add the following to /etc/vntab: /dev/vn1c /usr2/swapfile swap You will have to make the vn1 devices with /dev/MAKEDEV. > > 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. I guess the /etc/rc file does not cover your situation as it only handles one extra swap file. You will have to add startup code for your second swap file manually, possibly using /etc/rc.local. In your case you probably do not want to add the swapfile="/usr?/swapfile" line to /etc/rc.conf but instead run vnconfig -a at some point during startup to read your /etc/vntab file, followed by: swapon /dev/vn0c /dev/vn1c -- Glenn Johnson glennpj@charter.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message