1 .\" $NetBSD: vnconfig.8,v 1.33 2005/09/11 23:49:58 wiz Exp $
3 .\" Copyright (c) 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.
30 .\" Copyright (c) 1980, 1989, 1991, 1993
31 .\" The Regents of the University of California. All rights reserved.
33 .\" This code is derived from software contributed to Berkeley by
34 .\" the Systems Programming Group of the University of Utah Computer
35 .\" Science Department.
37 .\" Redistribution and use in source and binary forms, with or without
38 .\" modification, are permitted provided that the following conditions
40 .\" 1. Redistributions of source code must retain the above copyright
41 .\" notice, this list of conditions and the following disclaimer.
42 .\" 2. Redistributions in binary form must reproduce the above copyright
43 .\" notice, this list of conditions and the following disclaimer in the
44 .\" documentation and/or other materials provided with the distribution.
45 .\" 3. Neither the name of the University nor the names of its contributors
46 .\" may be used to endorse or promote products derived from this software
47 .\" without specific prior written permission.
49 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
50 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
51 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
52 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
53 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
55 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
56 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
57 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
58 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
61 .\" Copyright (c) 1993 University of Utah.
63 .\" This code is derived from software contributed to Berkeley by
64 .\" the Systems Programming Group of the University of Utah Computer
65 .\" Science Department.
67 .\" Redistribution and use in source and binary forms, with or without
68 .\" modification, are permitted provided that the following conditions
70 .\" 1. Redistributions of source code must retain the above copyright
71 .\" notice, this list of conditions and the following disclaimer.
72 .\" 2. Redistributions in binary form must reproduce the above copyright
73 .\" notice, this list of conditions and the following disclaimer in the
74 .\" documentation and/or other materials provided with the distribution.
75 .\" 3. All advertising materials mentioning features or use of this software
76 .\" must display the following acknowledgement:
77 .\" This product includes software developed by the University of
78 .\" California, Berkeley and its contributors.
79 .\" 4. Neither the name of the University nor the names of its contributors
80 .\" may be used to endorse or promote products derived from this software
81 .\" without specific prior written permission.
83 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
84 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
85 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
86 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
87 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
88 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
89 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
90 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
91 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
92 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
95 .\" @(#)vnconfig.8 8.1 (Berkeley) 6/5/93
102 .Nd configure vnode disks
121 command configures vnode pseudo disk devices.
122 It will associate the vnode disk
124 with the regular file
126 allowing the latter to be accessed as though it were a disk.
127 Hence a regular file within the filesystem can be used for swapping
128 or can contain a filesystem that is mounted in the name space.
131 is a special file of raw partition or name of vnode disk like
134 Options indicate an action to be performed:
135 .Bl -tag -width indent
137 Configures the device.
138 If successful, references to
140 will access the contents of
145 is specified, the vnode device will emulate the specified disk geometry.
149 .Bd -ragged -offset indent
151 .Xo Ar secsize Li / Ar nsectors Li /
152 .Ar ntracks Li / Ar ncylinders Xc
156 If geometry is not specified, the kernel will choose a default based on 1MB
159 is the number of bytes per sector. It must be an even multiple of 512.
161 is the number of sectors per track.
163 is the number of tracks per cylinder.
165 is the number of cylinders in the device.
167 Force unconfiguration if the device is in use.
173 option should look up in
178 List the vnd devices and indicate which ones are in use. If a specific
180 is given, then only that will be described.
182 If configuring the device, look up
186 and use the geometry specified in the entry. This option and the
188 argument are mutually exclusive.
190 Configure the device as read-only.
192 Unconfigures the device.
194 Print messages to stdout describing actions taken.
198 is a compressed disk image in cloop2 format, and configure it
202 manpage on how to create such an image.
205 If no action option is given,
209 .Bl -tag -width /etc/disktab -compact
215 .Dl vnconfig vnd0 /tmp/diskimage
217 .Dl vnconfig /dev/rvnd0c /tmp/diskimage
219 Configures the vnode disk
221 Please note that use of the second form of the command is discouraged because
222 it requires knowledge of the raw partition which varies between architectures.
224 .Dl vnconfig vnd0 /tmp/floppy.img 512/18/2/80
226 Configures the vnode disk
228 emulating the geometry of 512 bytes per sector, 18 sectors per track,
229 2 tracks per cylinder, and 80 cylinders total.
231 .Dl vnconfig -t floppy vnd0 /tmp/floppy.img
233 Configures the vnode disk
235 using the geometry specified in the
257 This command should really be named