xref: /openbsd/share/man/man4/vnd.4 (revision f2dfb0a4)
1.\"	$OpenBSD: vnd.4,v 1.6 1998/03/10 04:50:46 millert Exp $
2.\"	$NetBSD: vnd.4,v 1.1 1995/12/30 18:10:48 thorpej Exp $
3.\"
4.\" Copyright (c) 1995 Jason R. Thorpe.
5.\" All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. All advertising materials mentioning features or use of this software
16.\"    must display the following acknowledgement:
17.\"	This product includes software developed for the NetBSD Project
18.\"	by Jason R. Thorpe.
19.\" 4. Neither the name of the author nor the names of its contributors
20.\"    may be used to endorse or promote products derived from this software
21.\"    without specific prior written permission.
22.\"
23.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
24.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
27.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
30.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE.
34.\"
35.Dd December 30, 1995
36.Dt VND 4
37.Os OpenBSD
38.Sh NAME
39.Nm vnd
40.Nd Vnode Disk Driver
41.Sh SYNOPSIS
42.Cd "pseudo-device vnd 4"
43.Sh DESCRIPTION
44The
45.Nm
46driver provides a disk-like interface to a file.  This is useful for
47a variety of applications, including swap files and building miniroot
48or floppy disk images.  There are two variants, the traditional
49.Nm
50that bypasses the buffercache and thus is suitable for swap on files, but
51not for building disk-images, and the
52.Nm svnd
53("safe"
54.Nm
55) variant that goes
56through the buffercache, thereby maintaining cache-coherency after the
57block-device is closed which makes it suitable for creating disk images.
58The latter is not good for swapping on, though.
59.Pp
60This document assumes that you're familiar with how to generate kernels,
61how to properly configure disks and pseudo-devices in a kernel
62configuration file.
63.Pp
64In order to compile in support for the
65.Nm
66, you must add a line similar
67to the following to your kernel configuration file:
68.Bd -unfilled -offset indent
69pseudo-device	vnd	4	# vnode disk driver
70.Ed
71.Pp
72The count argument is how many
73.Nm vnds
74memory is allocated for a boot time.  In this example, no more than 4
75.Nm vnds
76may be configured.
77.Pp
78There is a run-time utility that is used for configuring
79.Nm vnds .
80See
81.Xr vnconfig 8
82for more information.
83.Sh BUGS
84The
85.Nm
86driver does not work if the file does not reside in a local filesystem.
87However the
88.Nm svnd
89variant does.
90.Sh FILES
91/dev/{,r}{,s}vnd* - vnd device special files.
92.Pp
93.Sh HISTORY
94The vnode disk driver was originally written at the University of
95Utah.  The svnd variant was first seen in
96.Ox 2.1 .
97.Sh SEE ALSO
98.Xr MAKEDEV 8 ,
99.Xr config 8 ,
100.Xr config.old 8 ,
101.Xr fsck 8 ,
102.Xr mount 8 ,
103.Xr newfs 8 ,
104.Xr vnconfig 8 .
105