1.\" $NetBSD: vnd.4,v 1.16 2009/03/26 17:33:41 joerg Exp $ 2.\" 3.\" Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Jason R. Thorpe. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.Dd February 1, 2006 31.Dt VND 4 32.Os 33.Sh NAME 34.Nm vnd 35.Nd vnode disk driver 36.Sh SYNOPSIS 37.Cd "pseudo-device vnd" 38.Cd "options VND_COMPRESSION" 39.Sh DESCRIPTION 40The 41.Nm 42driver provides a disk-like interface to a file. 43This is useful for a variety of applications, including swap files 44and building miniroot or floppy disk images. 45.Pp 46This document assumes that you're familiar with how to generate kernels, 47how to properly configure disks and pseudo-devices in a kernel 48configuration file. 49.Pp 50In order to compile in support for the vnd, you must add a line similar 51to the following to your kernel configuration file: 52.Bd -unfilled -offset indent 53pseudo-device vnd # vnode disk driver 54.Ed 55.Pp 56To also compile in support for reading compressed disk images, 57add the following option to your kernel config file: 58.Bd -unfilled -offset indent 59options VND_COMPRESSION # compressed vnd(4) 60.Ed 61.Pp 62Compressed disk images are expected in the cloop2 format, 63they can be created from "normal" disk images by the 64.Xr vndcompress 1 65program. 66.Pp 67There is a run-time utility that is used for configuring 68both compressed and uncompressed 69.Nm vnd Ns s . 70See 71.Xr vnconfig 8 72for more information. 73.Sh FILES 74.Bl -tag -width /dev/XXrXvndX -compact 75.It Pa /dev/{,r}vnd* 76vnd device special files. 77.El 78.Sh SEE ALSO 79.Xr config 1 , 80.Xr vndcompress 1 , 81.Xr MAKEDEV 8 , 82.Xr fsck 8 , 83.Xr mount 8 , 84.Xr newfs 8 , 85.Xr vnconfig 8 86.Sh HISTORY 87The vnode disk driver was originally written at the University of 88Utah. 89The compression handling is based on code by 90.An Cliff Wright 91.Aq cliff@snipe444.org . 92.Sh BUGS 93The 94.Nm 95driver does not work if the file does not reside in a local filesystem. 96