1 .\" $NetBSD: vnconfig.8,v 1.39 2013/06/09 18:39:31 christos 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) 1993 University of Utah.
31 .\" Copyright (c) 1980, 1989, 1991, 1993
32 .\" The Regents of the University of California. All rights reserved.
34 .\" This code is derived from software contributed to Berkeley by
35 .\" the Systems Programming Group of the University of Utah Computer
36 .\" Science Department.
38 .\" Redistribution and use in source and binary forms, with or without
39 .\" modification, are permitted provided that the following conditions
41 .\" 1. Redistributions of source code must retain the above copyright
42 .\" notice, this list of conditions and the following disclaimer.
43 .\" 2. Redistributions in binary form must reproduce the above copyright
44 .\" notice, this list of conditions and the following disclaimer in the
45 .\" documentation and/or other materials provided with the distribution.
46 .\" 3. Neither the name of the University nor the names of its contributors
47 .\" may be used to endorse or promote products derived from this software
48 .\" without specific prior written permission.
50 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
51 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
52 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
53 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
54 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
55 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
56 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
57 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
58 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
59 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
62 .\" @(#)vnconfig.8 8.1 (Berkeley) 6/5/93
69 .Nd configure vnode disks
88 command configures vnode pseudo disk devices.
89 It will associate the vnode disk
93 allowing the latter to be accessed as though it were a disk.
94 Hence a regular file within the filesystem can be used for swapping
95 or can contain a filesystem that is mounted in the name space.
98 is a special file of raw partition or name of vnode disk like
101 Options indicate an action to be performed:
102 .Bl -tag -width indent
104 Configures the device.
105 If successful, references to
107 will access the contents of
112 is specified, the vnode device will emulate the specified disk geometry.
116 .Bd -ragged -offset indent
118 .Xo Ar secsize Li / Ar nsectors Li /
119 .Ar ntracks Li / Ar ncylinders Xc
123 If geometry is not specified, the kernel will choose a default based on 1MB
126 is the number of bytes per sector.
127 It must be an even multiple of 512.
129 is the number of sectors per track.
131 is the number of tracks per cylinder.
133 is the number of cylinders in the device.
135 Force unconfiguration if the device is in use.
141 option should look up in
146 List the vnd devices and indicate which ones are in use.
149 is given, then only that will be described.
151 If configuring the device, look up
155 and use the geometry specified in the entry.
158 argument are mutually exclusive.
160 Configure the device as read-only.
162 Unconfigures the device.
164 Print messages to stdout describing actions taken.
168 is a compressed disk image in cloop2 format, and configure it
172 manpage on how to create such an image.
175 If no action option is given,
179 .Bl -tag -width /etc/disktab -compact
185 .Dl vndconfig vnd0 /tmp/diskimage
187 .Dl vndconfig /dev/rvnd0c /tmp/diskimage
189 Configures the vnode disk
191 Please note that use of the second form of the command is discouraged because
192 it requires knowledge of the raw partition which varies between architectures.
194 .Dl vndconfig vnd0 /tmp/floppy.img 512/18/2/80
196 Configures the vnode disk
198 emulating the geometry of 512 bytes per sector, 18 sectors per track,
199 2 tracks per cylinder, and 80 cylinders total.
201 .Dl vndconfig -t floppy vnd0 /tmp/floppy.img
203 Configures the vnode disk
205 using the geometry specified in the
210 .Dl vndconfig -u vnd0
228 This command should really be named