*BSD News Article 92409


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!mindspring!uunet!in1.uu.net!204.147.226.2!quack!quack.kfu.com!nsayer
From: nsayer@quack.kfu.com (Nick Sayer)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Adding Swap space....
Date: 31 Mar 1997 06:25:21 GMT
Organization: The Duck Pond public unix - http://www.kfu.com/
Lines: 41
Message-ID: <5hnlch$jnh$1@phoenix.kfu.com>
References: <333B5CF3.41C67EA6@silas.cc.monash.edu.au>
NNTP-Posting-Host: quack.kfu.com
X-Newsreader: NN version 6.5.1 (NOV)
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:38126

Chooka <dhenshaw@silas.cc.monash.edu.au> writes:

>Hi all,

Hi.

>I've seen mentioned in the FAQ the use of the pseudo-device vn to create
>swap files using regular files.  

>I haven't had any success in doing this.
>I desperately need to add more swap, but don't have any extra HD space
>to use.  

>Anyone know how this can be done ?

1. Use dd to create a file of the correct size:

dd if=/dev/zero of=SWAPFILE bs=1m count=n (where n is how many mb of
swap you want to add)

2. Use vnconfig to assign this file to a vnode:

vnconfig -e /dev/vn0b SWAPFILE swap

To make it permanent, edit /etc/sysconfig and find the swapfile=
entry and put your file there.

>Is there a command that will report the amount of swap space left ?

pstat -T is one

>(i.e. the amount of swap not in use ?)
>surely df should handle this ?

Nope. swap is not a mounted filesystem.

-- 
Nick Sayer <nsayer@quack.kfu.com>  | 
N6QQQ @ N0ARY.#NORCAL.CA.USA.NOAM  | "[Ted Kennedy] immatures with age."
+1 408 249 9630, log in as 'guest' | 
URL: http://www.kfu.com/~nsayer/   |       -- Mort Zuckerman