rebuild kernel to add vn pseudo-device for swap file

David Kelly dkelly at HiWAAY.net
Mon Apr 7 19:14:18 PDT 2003


On Monday 07 April 2003 10:51 am, Dave [Hawk-Systems] wrote:
> Has a server halt last night because it ran out of swap space.  The
> server is slated for upgrade this month anyway (currently on 4.3) so
> I don't want to worry about reslicing a partition.  Figured the
> easiest would be to add a swap file for a temporary solution but the
> pseudo-device vn isn't in our customized kernel.
>
> What would be the minimal process to rebuild the kernel with this
> device, or is the whole blown out proceedure requried as when we
> trimmed the kernel in the first place.

Add this line (borrowed from /usr/src/sys/i386/conf/LINT) to your 
stipped kernel config file:

pseudo-device   vn 	#Vnode driver (turns a file into a device)

Then rebuild and install your kernel. Takes about 10 or 15 minutes. No 
reason not to do it in multiuser mode. So the only downtime would be 
however long it takes to reboot your hardware.

I like to copy items from LINT like this:

% cd /usr/src/sys/i386/conf/
% grep vn LINT >> MYKERNEL

vn works perfectly fine at the tail end of your kernel config.

-- 
David Kelly N4HHE, dkelly at hiwaay.net
=====================================================================
The human mind ordinarily operates at only ten percent of its
capacity -- the rest is overhead for the operating system.


More information about the freebsd-questions mailing list