Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

vnconfig(8) [netbsd man page]

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

vnconfig -- configure vnode disks SYNOPSIS
vnconfig [-crvz] [-f disktab] [-t typename] vnode_disk regular_file [geomspec] vnconfig -u [-Fv] vnode_disk vnconfig -l [vnode_disk] DESCRIPTION
The vnconfig 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 con- tain 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 kernel 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. -F Force unconfiguration if the device is in use. Does not imply -u. -f disktab Specifies that the -t option should look up in disktab instead of in /etc/disktab. -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. -t typename If configuring the device, look up typename in /etc/disktab and use the geometry specified in the entry. This option and the geomspec argument are mutually exclusive. -r Configure the device as read-only. -u Unconfigures the device. -v Print messages to stdout describing actions taken. -z Assume that regular_file is a compressed disk image in cloop2 format, and configure it read-only. See the vndcompress(1) manpage on how to create such an image. If no action option is given, -c is assumed. FILES
/dev/rvnd?? /dev/vnd?? /etc/disktab EXAMPLES
vnconfig vnd0 /tmp/diskimage or vnconfig /dev/rvnd0c /tmp/diskimage Configures the vnode disk vnd0. Please note that use of the second form of the command is discouraged because it requires knowledge of the raw partition which varies between architectures. vnconfig 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. vnconfig -t floppy vnd0 /tmp/floppy.img Configures the vnode disk vnd0 using the geometry specified in the floppy entry in /etc/disktab. vnconfig -u vnd0 Unconfigures the vnd0 device. SEE ALSO
opendisk(3), vnd(4), mount(8), swapctl(8), umount(8) HISTORY
The vnconfig command appeared in NetBSD 1.0. BUGS
This command should really be named vndconfig. BSD
July 16, 2005 BSD

Check Out this Related Man Page

VNDCOMPRESS(1)						    BSD General Commands Manual 					    VNDCOMPRESS(1)

vndcompress, vnduncompress -- compress/uncompress file system images to/from cloop2 format SYNOPSIS
vndcompress [-cd] disk/fs-image compressed-image [blocksize] vnduncompress [-cd] compressed-image disk/fs-image DESCRIPTION
The vndcompress program compresses an existing file system image into a cloop2 compatible compressed file system image. An optional block- size can be given. If omitted, the default of 64kB is used. The vnduncompress command decompress a cloop2-compressed file system image back into a regular image. The file system images that can be handled are not limited to any specific file system, i.e. it is possible to handle images e.g. in ISO 9660 or UFS/FFS format. File system images in the cloop2 format are intended to be used with the vnd(4) driver in compressed mode as configured by the -z option of the vnconfig(8) program, and later mounted with the appropriate -t option to mount(8). OPTIONS
The following options are available: -c Always compress, even if the program was started as vnduncompress. -d Always uncompress (decompress), even if the program was started as vndcompress. EXIT STATUS
The vndcompress and vnduncompress utilities exit with one of the following values: 0 The operation was performed successfully. 1 An error occurred. EXAMPLES
To compress an existing CD-ROM file system image, run the following commands: # vndcompress netbsd.iso netbsd.izo Note that the resulting compressed image cannot be mounted directly via NetBSD's vnd(4) and mount_cd9660(8) commands any longer. Instead, you will have to use the -z option of vnconfig(8). The following example decompresses an existing CD-ROM file system image that was compressed in the cloop2 format into a regular file that can then be mounted: # vnconfig vnd0 KNOPPIX.iso # mount -t cd9660 -o ro /dev/vnd0d /mnt # vnduncompress /mnt/KNOPPIX/KNOPPIX /var/tmp/knoppix.iso # umount /mnt # vnconfig -u vnd0 # # vnconfig vnd1 /var/tmp/knoppix.iso # mount -t cd9660 -o ro /dev/vnd1d /mnt # ls /mnt .rr_moved cdrom floppy lib opt sbin usr bin dev home mnt proc sys var boot etc initrd none root tmp vmlinuz # umount /mnt # vnconfig -u vnd1 As an alternative, if your vnd(4) was compiled with VND_COMPRESSION, you can use vnconfig(8) to access the cloop-compressed image directly, e.g., # vnconfig vnd0 KNOPPIX.iso # mount -t cd9660 -o ro /dev/vnd0d /mnt # vnconfig -z vnd1 /mnt/KNOPPIX/KNOPPIX # mount -t cd9660 -o ro /dev/vnd1d /mnt2 # ls /mnt2 .rr_moved cdrom floppy lib opt sbin usr bin dev home mnt proc sys var boot etc initrd none root tmp vmlinuz # df /mnt /mnt2 Filesystem Size Used Avail Capacity Mounted on /dev/vnd0a 692M 692M 0B 100% /mnt /dev/vnd1a 1.9G 1.9G 0B 100% /mnt2 # umount /mnt2 # vnconfig -u vnd1 # umount /mnt # vnconfig -u vnd0 Note how the 1.9GB big filesystem on /mnt2 is mounted from the compressed file stored on the 692MB CD mounted on /mnt. To create a com- pressed file system image of an existing directory and mount it, run: # makefs -t ffs include.fs /usr/include # vndcompress include.fs include.fs.cloop2 # vnconfig -z vnd0 include.fs.cloop2 # mount -o ro /dev/vnd0a /mnt # ls /mnt To undo the steps, run: # umount /mnt # vnconfig -u vnd0 # rm /tmp/include.fs.cloop2 # rm /tmp/include.fs SEE ALSO
gzip(1), vnd(4), mount(8), mount_cd9660(8), vnconfig(8) AUTHORS
The vndcompress utility was written by Florian Stoehr <>. The vndcompress manual page was written by Florian Stoehr <> and Hubert Feyrer <>. BSD
December 12, 2005 BSD
Man Page