Subject: Re: Swap ... (Was: Re: The obvious inherent superiority of SVR4 device naming...)
To: None <current-users@NetBSD.ORG>
From: Daniel Carosone <>
List: current-users
Date: 12/27/1994 10:53:02
Chris G. Demetriou writes:
 > >  Reminds me to ask whether it is possible to swap over NFS/NetWork? If so,
 > > how?
 > however, it _is_ (or should be; it is if the config parameters for
 > the architecture you're working with are set up properly) possible to
 > say e.g. 'root sd0a swap sd0b and vnd0b' (or something similar).
 > Then you can vnconfig a file to that vnd device, and then swapon to it.
 > (This'll work for local files _and_ files over NFS.)  (Note that i've
 > not tried this one either...  however, if i recall correctly, the
 > reason vnd's were added to the system was to do swap over NFS...)

To swap to files, NFS or otherwise, but be careful..

There was, in 1.0, a serious problem I found using vnd's on
NFS-mounted vnodes. It surfaced when I was trying to make some install
disks on an i386 - my source tree is on a sparc, and NFS mounted. The
procedure to make disk images uses a vnd, and would very quickly panic
the kernel with a filesystem error ("corrupt directory" seemed
popular) once the vnd was mounted and being written to.  I'm not sure
if it affects swapping also, but I'd guess it would given the mumbling
and cursing noises Charles made at the time.

I haven't looked to see if this was fixed in -current. I'm *almost*
certain there ought to be a PR sitting around in the database on this,
if someone who can look at them wants to check, and finds that there
isn't one, please let me know and I'll file one with current details.

Oh, also, for those on architectures where you can't put vnd's on the
swap part of the config line, you can cheat by editing swapnetbsd.c in
the compile directory each time after you run