xref: /netbsd-src/share/man/man4/vnd.4 (revision 9674f1fbd64fc78b8997c4173a3c105b83c78e43)
1.\"	$NetBSD: vnd.4,v 1.19 2017/09/29 08:46:47 maya 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 September 29, 2017
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
47and how to properly configure disks and pseudo-devices in a kernel
48configuration file.
49.Pp
50In order to compile in support for the
51.Nm ,
52you must add a line similar
53to the following to your kernel configuration file:
54.Bd -unfilled -offset indent
55pseudo-device	vnd		# vnode disk driver
56.Ed
57.Pp
58To also compile in support for reading compressed disk images,
59add the following option to your kernel config file:
60.Bd -unfilled -offset indent
61options        VND_COMPRESSION    # compressed vnd(4)
62.Ed
63.Pp
64Compressed disk images are expected in the cloop2 format.
65They can be created from
66.Dq normal
67disk images by the
68.Xr vndcompress 1
69program.
70.Pp
71There is a run-time utility that is used for configuring
72both compressed and uncompressed
73.Nm vnd Ns s ;
74see
75.Xr vnconfig 8
76for more information.
77.Sh FILES
78.Bl -tag -width /dev/XXrXvndX -compact
79.It Pa /dev/{,r}vnd*
80vnd device special files.
81.El
82.Sh SEE ALSO
83.Xr config 1 ,
84.Xr vndcompress 1 ,
85.Xr fsck 8 ,
86.Xr MAKEDEV 8 ,
87.Xr mount 8 ,
88.Xr newfs 8 ,
89.Xr vnconfig 8
90.Sh HISTORY
91The vnode disk driver was originally written at the University of
92Utah.
93The compression handling is based on code by
94.An Cliff Wright
95.Aq cliff@snipe444.org .
96.Sh BUGS
97The
98.Nm
99driver does not work if the file does not reside in a local filesystem.
100