1 .\" $NetBSD: vnd.4,v 1.16 2009/03/26 17:33:41 joerg Exp $
3 .\" Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
7 .\" by Jason R. Thorpe.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
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.
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.
37 .Cd "pseudo-device vnd"
38 .Cd "options VND_COMPRESSION"
42 driver provides a disk-like interface to a file.
43 This is useful for a variety of applications, including swap files
44 and building miniroot or floppy disk images.
46 This document assumes that you're familiar with how to generate kernels,
47 how to properly configure disks and pseudo-devices in a kernel
50 In order to compile in support for the vnd, you must add a line similar
51 to the following to your kernel configuration file:
52 .Bd -unfilled -offset indent
53 pseudo-device vnd # vnode disk driver
56 To also compile in support for reading compressed disk images,
57 add the following option to your kernel config file:
58 .Bd -unfilled -offset indent
59 options VND_COMPRESSION # compressed vnd(4)
62 Compressed disk images are expected in the cloop2 format,
63 they can be created from "normal" disk images by the
67 There is a run-time utility that is used for configuring
68 both compressed and uncompressed
74 .Bl -tag -width /dev/XXrXvndX -compact
76 vnd device special files.
87 The vnode disk driver was originally written at the University of
89 The compression handling is based on code by
91 .Aq cliff@snipe444.org .
95 driver does not work if the file does not reside in a local filesystem.
99 driver does not work if the file is sparse.