Subject: Using /dev/vnd0* for swap?
To: None <netbsd-help@NetBSD.ORG>
From: Robert Kennedy <robert@Theory.Stanford.EDU>
List: netbsd-help
Date: 04/04/1996 10:30:52
I am trying to increase my swap space by configuring a vnode
pseudo-disk device and using it for swap.

The first issue I run up against is that I don't know how to build a
regular file of the appropriate size. There appears to be no 'mkfile'
under NetBSD (or any BSD?), so I just 'cat'ted  together enough copies
of a big file to account for the amount of space I wanted.

The
vnconfig -c -v /dev/vnd0a /usr/tmp/swapspace
command seems to go fine, and it tells me it's found the number of
bytes of space in the file.

The next step, I imagine, would be to disklabel the vnode 'disk', but
disklabel complains that some ioctl is inappropriate for the device
(sorry -- I don't have the exact message with me). If I try to run
'swapon' on the device, that command complains that the device is not
configured. The express purpose of vnconfig, according to the man
page, is to *configure* the device, and I didn't get any error
messages from vnconfig, so the device damn well ought to be
configured. It would therefore seem to be a bug that I get 'device not
configured' messages from swapon after I have configured the device
with vnconfig.

What am I doing wrong? How can I use vnconfig for its intended
purpose? Can someone give me an explicit set of steps to follow for
using a regular file as swap space? Please tell me what man page
I should have read for this information.

Thanks!

	-- Robert Kennedy