Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Aug 1995 10:02:50 -0400
From:      Glen Foster <gfoster@osmre.gov>
To:        doc@freebsd.org
Subject:   Re: How to make a swapfile
Message-ID:  <199508021402.KAA16444@nomad.osmre.gov>
In-Reply-To: <199508020924.CAA10579@silvia.HIP.Berkeley.EDU> (asami@CS.Berkeley.EDU)

next in thread | previous in thread | raw e-mail | index | archive | help

Of course the directives to configure and generate a kernel with the
vnode code in it and to make the vn devices should be included in the
directions (or a pointer to the info should be included).  Also,
perhaps, a short narrative about why one might want to do this rather
than use traditional swap partitions (is this just a space/speed
tradeoff or are there other considerations?)


> Date: Wed, 2 Aug 1995 02:24:42 -0700
> From: asami@CS.Berkeley.EDU (Satoshi Asami)
> Sender: doc-owner@freebsd.org
> Precedence: bulk
>
> Can we make a section about this in the handbook?  It should be
> something like
>
> =======
> If you want to make a 32MB swapfile, do this.
>
> (1) Find a partition on your disk that has enough free space to hold a
>     32MB file.  Say that's /var.
>
> (2) Use the dd command:
>
>     dd if=/dev/zero of=/var/swapfile bs=1024k count=32
>
>     to create a 32MB file.
>
> (3) cd to /dev and issue the command:
>
>     sh ./MAKEDEV vn0
>
>     to create a virtual node.
>
> (4) Use the vnconfig command:
>
>     vnconfig -e /dev/vn0c /var/swapfile swap
>
>     to configure that file as a virtual node with swap enabled.
>
> (5) Add it to the system's swap pool by:
>
>     swapon /var/swapfile
>
> (6) Check that it is working by:
>
>     pstat -s
>
> =======
>
> We might want something about doing this automatically at boot.  Will
> this be enough?
>
> # cat >> /etc/vntab
> /dev/vn0c /var/swapfile
> ^D
> # cat >> /etc/fstab
> /dev/vn0c none swap sw 0 0
> ^D
>
> Hmm, actually I don't know if /etc/vntab is scanned during reboot.
> Should the vnconfig -a and swapon go to rc.local?
>
> Satoshi
>
   P.S. What happened to my slip client section? :)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508021402.KAA16444>