VNDCONFIG(8)

NAME
vndconfig - configure vnode disks

SYNOPSIS
vndconfig [-Scrv] vnode_disk regular_file [geomspec]
vndconfig -u [-SFv] vnode_disk
vndconfig -l [vnode_disk]

DESCRIPTION
The vndconfig command configures vnode pseudo disk devices. It will associate the vnode disk vnode_disk with the regular file regular_file allowing the latter to be accessed as though it were a disk. Hence a regular file within the filesystem can be used for swapping or can contain a filesystem that is mounted in the name space. The vnode_disk is a special file of raw partition or name of vnode disk like vnd0.

Options indicate an action to be performed:

-c  Configures the device. If successful, references to vnode_disk will access the contents of regular_file.

    If geomspec is specified, the vnode device will emulate the specified disk geometry. The format of the geomspec argument is:

    secsize/nsectors/ ntracks/ncylinders

    If geometry is not specified, the driver will choose a default based on 1MB cylinders. secsize is the number of bytes per sector. It must be an even multiple of 512. nsectors is the number of sectors per track. ntracks is the number of tracks per cylinder. ncylinders is the number of cylinders in the device.

-S  Do not start or stop the corresponding device driver instance.

-F  Force unconfiguration if the device is in use. Does not imply -u.

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

-r  Configure the device as read-only.

-u  Unconfigures the device.

-v  Print messages to stdout describing actions taken.

If no action option is given, -c is assumed.

FILES
/dev/vnd*

EXAMPLES
    vndconfig vnd0 /tmp/diskimage
or
    vndconfig /dev/vnd0 /tmp/diskimage

Configures the vnode disk vnd0.

    vndconfig vnd0 /tmp/floppy.img 512/18/2/80

Configures the vnode disk vnd0 emulating the geometry of 512 bytes per sector, 18 sectors per track, 2 tracks per cylinder, and 80 cylinders total.

    vndconfig -u vnd0

Unconfigures the vnd0 device.

NOTES
If vnconfig -uF is used and the device was still in use, the driver instance will not be shut down, even if -S was not given. One may manually shut down the service later with service down vndN where N is the instance number, or simply leave the driver running for later reuse.

SEE ALSO
opendisk(3), mount(8), umount(8)