From owner-freebsd-questions Sun May 28 16:25:55 2000 Delivered-To: freebsd-questions@freebsd.org Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207]) by hub.freebsd.org (Postfix) with ESMTP id 5A56D37B8E2 for ; Sun, 28 May 2000 16:25:50 -0700 (PDT) (envelope-from cjc@cc942873-a.ewndsr1.nj.home.com) Received: (from cjc@localhost) by cc942873-a.ewndsr1.nj.home.com (8.9.3/8.9.3) id TAA56892; Sun, 28 May 2000 19:25:42 -0400 (EDT) (envelope-from cjc) Date: Sun, 28 May 2000 19:25:42 -0400 From: "Crist J. Clark" To: Forrest Aldrich Cc: freebsd-questions@FreeBSD.ORG Subject: Re: adding swap via vnconfig Message-ID: <20000528192542.I55597@cc942873-a.ewndsr1.nj.home.com> Reply-To: cjclark@home.com References: <4.3.2.7.2.20000528182151.00d7d880@216.67.12.69> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <4.3.2.7.2.20000528182151.00d7d880@216.67.12.69>; from forrie@forrie.com on Sun, May 28, 2000 at 06:25:12PM -0400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, May 28, 2000 at 06:25:12PM -0400, Forrest Aldrich wrote: > I have an older system (FreeBSD-2.2.8) that is under production and cannot > be brought down until a new machine is built. In the mean time, I need to > add a lot of swap space to it. > > I've done this: > > vnconfig -ce /dev/vn0c /usr/local/swapfile swap > > (vn was already in the kernel and the devices are there already). > > Now, it's not clear to me where I can see (other than ls -l) that the file > is actually being utilized, or at what point it would be. The goal being > to add space for swapping for our very busy named daemon. $ swapinfo > I've noted in /etc/rc.conf the swapfile definition, and I've set that; > however, I presume I needed to add the above vnconfig statement to > /etc/rc.local to enable it (since I cannot find info on the format of > /etc/vnconfig). No. If you add the file to /etc/rc.conf, that is all you need to do. See the following in /etc/rc, # Add additional swapfile, if configured. if [ "x$swapfile" != "xNO" -a -w "$swapfile" -a -b /dev/vn0b ]; then echo "Adding $swapfile as additional swap." vnconfig /dev/vn0b $swapfile && swapon /dev/vn0b fi > This is an emergency procedure, and of course other routes will be taken > once the crisis is overwith. One thing, you did "take up some space" with /usr/local/swapfile before you enabled it? Something like, # dd if=/dev/zero of=/usr/local/swapfile bs=1m count=64 Which would make the file, and your resulting swap space, 64 MB. -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message