Date: Sun, 28 May 2000 19:25:42 -0400 From: "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com> To: Forrest Aldrich <forrie@forrie.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: adding swap via vnconfig Message-ID: <20000528192542.I55597@cc942873-a.ewndsr1.nj.home.com> 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 References: <4.3.2.7.2.20000528182151.00d7d880@216.67.12.69>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000528192542.I55597>
