VNCONFIG(8)             OpenBSD System Manager's Manual            VNCONFIG(8)

NAME
     vnconfig - configure vnode disks for file swapping or pseudo file systems

SYNOPSIS
     vnconfig [-ckluv] [-K rounds] [-S saltfile] rawdev regular_file

DESCRIPTION
     The vnconfig command configures vnode pseudo disk devices.  It will asso-
     ciate (or disassociate) the special file rawdev with the regular file
     regular_file, allowing the latter to be accessed as though it were a
     disk.  Hence a regular file within the file system can be used for swap-
     ping or can contain a file system that is mounted in the name space.

     Both traditional devices, vnd(4), and the cache-coherent devices, svnd,
     are configured through vnconfig.  svnd should be mounted with the
     mount(8) option ``sync'' if regular_file is being read from, to ensure
     consistency in the buffer cache.  For normal operation this is not neces-
     sary.

     The options are as follows:

     -c      Configures the device.  If successful, references to rawdev will
             access the contents of regular_file.  This is the default opera-
             tion.

     -K rounds
             Associate an encryption key with the device.  All data will be
             encrypted using the Blowfish cipher before it is written to the
             disk.  The user is asked for both a passphrase and the name of a
             salt file.  The salt file can also be specified on the command
             line using the -S option.  The passphrase and salt are combined
             according to PKCS #5 PBKDF2 for the specified number of rounds to
             generate the actual key used.  rounds is a number between 1000
             and INT_MAX.  DO NOT LOSE THE SALT FILE.  Encryption only works
             with svnd.

     -k      Associate an encryption key with the device.  All data will be
             encrypted using the Blowfish cipher before it is written to the
             disk.  Encryption only works with svnd.

     -l      List the (s)vnd devices and indicate which ones are in use.  If a
             specific rawdev is given, then only that one will be described.

     -S saltfile
             When -K is used, specify the saltfile.

     -u      Unconfigures a rawdev.

     -v      Print messages to stdout describing actions taken.

FILES
     /dev/{,r}{,s}vnd*

EXAMPLES
     Configure a CD-ROM or DVD image file as vnode disk svnd0 and mount the
     ISO 9660 file system contained in it:

           # vnconfig svnd0 /tmp/diskimage
           # mount -t cd9660 /dev/svnd0c /mnt

     Configure an encrypted image file as vnode disk svnd0 and mount the FFS
     file system contained in it.  The encryption key does not echo and must
     be entered every time the vnode disk is configured.

           # vnconfig -k svnd0 /tmp/cryptimg
           Encryption key:
           # mount /dev/svnd0c /mnt

     Same as above, but now configure the vnode using PKCS #5 PBKDF2 and a
     salt file with 20000 rounds:

           # vnconfig -K 20000 svnd0 /tmp/cryptimg
           Encryption key:
           Salt file: /tmp/cryptsalt
           # mount /dev/svnd0c /mnt

     Unmount the file system and unconfigure the vnode device:

           # umount /mnt
           # vnconfig -u svnd0

SEE ALSO
     vnd(4), mount(8), swapon(8), umount(8)

BUGS
     This command should really be named vndconfig.

OpenBSD 4.1                      July 8, 1993                                2
