|MOUNT_VND(8)||System Manager's Manual||MOUNT_VND(8)|
vnconfig — configure vnode
vnconfig command configures vnode
pseudo disk devices. It will associate (or disassociate) the special file
vnd_dev with the regular file
image, allowing the latter to be accessed as though it
were a disk.
mount_vnd works similarly to
vnconfig, but it provides an interface that can be
used by the fstab(5)
infrastructure, so that an image file can be
configured to a device node while booting.
mount_vnd defaults to the
For fstab(5) lines with type “ffs”, the “noauto” option must be set to prevent a mount(8) of the FFS partitions before the necessary vnd devices are configured. Also, the “fs_passno” field has to be set to 0 to prevent fsck(8) from checking the file system for the same reasons.
mount_vnd is invoked by
mount(8) when using the
mount[options] -t vnd image node
The options are as follows:
vnconfigonly. Configures the device. If successful, references to vnd_dev will access the contents of image. This is the default operation.
-Soption. 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.
vnconfigonly. List the vnd devices and indicate which ones are in use. If a specific vnd_dev is given, then only that one will be described.
mount_vndonly. Options are specified with a
-oflag followed by a comma separated string of options. See the mount(8) man page for possible options and their meanings.
At the moment,
-o is only here for
compatibility reasons, but no use is made of supplied options.
-Kis used, specify the saltfile.
vnconfigonly. Unconfigures a vnd_dev.
vnconfigonly. Print messages to stdout describing actions taken.
Configure a CD-ROM or DVD image file as vnode disk vnd0 and mount the ISO 9660 file system contained in it:
# vnconfig vnd0 /tmp/diskimage # mount -t cd9660 /dev/vnd0c /mnt
Configure an encrypted image file as vnode disk vnd0 and mount the FFS file system contained in the ‘a’ partition of the disklabel. The encryption key does not echo and must be entered every time the vnode disk is configured.
# vnconfig -k vnd0 /tmp/cryptimg Encryption key: # mount /dev/vnd0a /mnt
An equivalent fstab(5) entry is:
/tmp/cryptimg /dev/vnd0c vnd rw,noauto,-k 0 0 /dev/vnd0a /mnt ffs rw,noauto 0 0
Same as above, but now configure the vnode using PKCS #5 PBKDF2 and a salt file with 20000 rounds:
# vnconfig -K 20000 vnd0 /tmp/cryptimg Encryption key: Salt file: /tmp/cryptsalt # mount /dev/vnd0a /mnt
An equivalent fstab(5) entry is:
/tmp/cryptimg /dev/vnd0c vnd rw,noauto,-K=20000 0 0 /dev/vnd0a /mnt ffs rw,noauto 0 0
Unmount the file system and unconfigure the vnode device:
# umount /mnt # vnconfig -u vnd0
A sample of commands to put in rc.local(8) in order to have vnd images configured at boot time is listed here:
# Example for automatically configuring a vnd device on startup echo "configuring vnd devices:" mount /dev/vnd0c fsck -p /dev/rvnd0a mount /mnt
mount_vnd command first appeared in
The ‘c’ partition of a vnd image should not be used. When a superblock becomes damaged, fsck_ffs(8) needs information contained in the disklabel to determine the location of alternate superblocks. This information is not available when directly using the ‘c’ partition, so checking the file system image will fail.
Swapping to vnd devices is no longer supported.
The encryption used is obsolete. Consider using softraid(4) instead.
|May 30, 2014||OpenBSD-6.5|