Sun Jun 9 18:39:05 2013 UTC ()
Alias this to vndconfig for symmetry.


(christos)
diff -r1.6 -r1.7 src/usr.sbin/vnconfig/Makefile
diff -r1.37 -r1.38 src/usr.sbin/vnconfig/vnconfig.8

cvs diff -r1.6 -r1.7 src/usr.sbin/vnconfig/Makefile (switch to unified diff)

--- src/usr.sbin/vnconfig/Makefile 2002/11/30 06:04:57 1.6
+++ src/usr.sbin/vnconfig/Makefile 2013/06/09 18:39:05 1.7
@@ -1,8 +1,10 @@ @@ -1,8 +1,10 @@
1# $NetBSD: Makefile,v 1.6 2002/11/30 06:04:57 lukem Exp $ 1# $NetBSD: Makefile,v 1.7 2013/06/09 18:39:05 christos Exp $
2 2
3PROG= vnconfig 3PROG= vnconfig
4MAN= vnconfig.8 4MAN= vnconfig.8
5DPADD+= ${LIBUTIL} 5DPADD+= ${LIBUTIL}
6LDADD+= -lutil 6LDADD+= -lutil
 7LINKS+= vnconfig vndconfig
 8MLINKS+= vnconfig.8 vndconfig.8
7 9
8.include <bsd.prog.mk> 10.include <bsd.prog.mk>

cvs diff -r1.37 -r1.38 src/usr.sbin/vnconfig/vnconfig.8 (switch to unified diff)

--- src/usr.sbin/vnconfig/vnconfig.8 2012/07/08 22:49:55 1.37
+++ src/usr.sbin/vnconfig/vnconfig.8 2013/06/09 18:39:05 1.38
@@ -1,229 +1,229 @@ @@ -1,229 +1,229 @@
1.\" $NetBSD: vnconfig.8,v 1.37 2012/07/08 22:49:55 wiz Exp $ 1.\" $NetBSD: vnconfig.8,v 1.38 2013/06/09 18:39:05 christos Exp $
2.\" 2.\"
3.\" Copyright (c) 1997 The NetBSD Foundation, Inc. 3.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Jason R. Thorpe. 7.\" by Jason R. Thorpe.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\" notice, this list of conditions and the following disclaimer in the 15.\" notice, this list of conditions and the following disclaimer in the
16.\" documentation and/or other materials provided with the distribution. 16.\" documentation and/or other materials provided with the distribution.
17.\" 17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 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 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 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 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 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 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 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE. 28.\" POSSIBILITY OF SUCH DAMAGE.
29.\" 29.\"
30.\" Copyright (c) 1993 University of Utah. 30.\" Copyright (c) 1993 University of Utah.
31.\" Copyright (c) 1980, 1989, 1991, 1993 31.\" Copyright (c) 1980, 1989, 1991, 1993
32.\" The Regents of the University of California. All rights reserved. 32.\" The Regents of the University of California. All rights reserved.
33.\" 33.\"
34.\" This code is derived from software contributed to Berkeley by 34.\" This code is derived from software contributed to Berkeley by
35.\" the Systems Programming Group of the University of Utah Computer 35.\" the Systems Programming Group of the University of Utah Computer
36.\" Science Department. 36.\" Science Department.
37.\" 37.\"
38.\" Redistribution and use in source and binary forms, with or without 38.\" Redistribution and use in source and binary forms, with or without
39.\" modification, are permitted provided that the following conditions 39.\" modification, are permitted provided that the following conditions
40.\" are met: 40.\" are met:
41.\" 1. Redistributions of source code must retain the above copyright 41.\" 1. Redistributions of source code must retain the above copyright
42.\" notice, this list of conditions and the following disclaimer. 42.\" notice, this list of conditions and the following disclaimer.
43.\" 2. Redistributions in binary form must reproduce the above copyright 43.\" 2. Redistributions in binary form must reproduce the above copyright
44.\" notice, this list of conditions and the following disclaimer in the 44.\" notice, this list of conditions and the following disclaimer in the
45.\" documentation and/or other materials provided with the distribution. 45.\" documentation and/or other materials provided with the distribution.
46.\" 3. Neither the name of the University nor the names of its contributors 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 47.\" may be used to endorse or promote products derived from this software
48.\" without specific prior written permission. 48.\" without specific prior written permission.
49.\" 49.\"
50.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 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 51.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
52.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 52.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
53.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 53.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
54.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 54.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
55.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 55.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
56.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 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 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 59.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
60.\" SUCH DAMAGE. 60.\" SUCH DAMAGE.
61.\" 61.\"
62.\" @(#)vnconfig.8 8.1 (Berkeley) 6/5/93 62.\" @(#)vnconfig.8 8.1 (Berkeley) 6/5/93
63.\" 63.\"
64.Dd July 9, 2012 64.Dd July 9, 2012
65.Dt VNCONFIG 8 65.Dt VNDCONFIG 8
66.Os 66.Os
67.Sh NAME 67.Sh NAME
68.Nm vnconfig 68.Nm vndconfig
69.Nd configure vnode disks 69.Nd configure vnode disks
70.Sh SYNOPSIS 70.Sh SYNOPSIS
71.Nm 71.Nm
72.Op Fl crvz 72.Op Fl crvz
73.Op Fl f Ar disktab 73.Op Fl f Ar disktab
74.Op Fl t Ar typename 74.Op Fl t Ar typename
75.Ar vnode_disk 75.Ar vnode_disk
76.Ar regular_file 76.Ar regular_file
77.Op Ar geomspec 77.Op Ar geomspec
78.Nm 78.Nm
79.Fl u 79.Fl u
80.Op Fl Fv 80.Op Fl Fv
81.Ar vnode_disk 81.Ar vnode_disk
82.Nm 82.Nm
83.Fl l 83.Fl l
84.Op Ar vnode_disk 84.Op Ar vnode_disk
85.Sh DESCRIPTION 85.Sh DESCRIPTION
86The 86The
87.Nm 87.Nm
88command configures vnode pseudo disk devices. 88command configures vnode pseudo disk devices.
89It will associate the vnode disk 89It will associate the vnode disk
90.Ar vnode_disk 90.Ar vnode_disk
91with the regular file 91with the regular file
92.Ar regular_file 92.Ar regular_file
93allowing the latter to be accessed as though it were a disk. 93allowing the latter to be accessed as though it were a disk.
94Hence a regular file within the filesystem can be used for swapping 94Hence a regular file within the filesystem can be used for swapping
95or can contain a filesystem that is mounted in the name space. 95or can contain a filesystem that is mounted in the name space.
96The 96The
97.Ar vnode_disk 97.Ar vnode_disk
98is a special file of raw partition or name of vnode disk like 98is a special file of raw partition or name of vnode disk like
99.Pa vnd0 . 99.Pa vnd0 .
100.Pp 100.Pp
101Options indicate an action to be performed: 101Options indicate an action to be performed:
102.Bl -tag -width indent 102.Bl -tag -width indent
103.It Fl c 103.It Fl c
104Configures the device. 104Configures the device.
105If successful, references to 105If successful, references to
106.Ar vnode_disk 106.Ar vnode_disk
107will access the contents of 107will access the contents of
108.Ar regular_file . 108.Ar regular_file .
109.Pp 109.Pp
110If 110If
111.Ar geomspec 111.Ar geomspec
112is specified, the vnode device will emulate the specified disk geometry. 112is specified, the vnode device will emulate the specified disk geometry.
113The format of the 113The format of the
114.Ar geomspec 114.Ar geomspec
115argument is: 115argument is:
116.Bd -ragged -offset indent 116.Bd -ragged -offset indent
117.Sm off 117.Sm off
118.Xo Ar secsize Li / Ar nsectors Li / 118.Xo Ar secsize Li / Ar nsectors Li /
119.Ar ntracks Li / Ar ncylinders Xc 119.Ar ntracks Li / Ar ncylinders Xc
120.Sm on 120.Sm on
121.Ed 121.Ed
122.Pp 122.Pp
123If geometry is not specified, the kernel will choose a default based on 1MB 123If geometry is not specified, the kernel will choose a default based on 1MB
124cylinders. 124cylinders.
125.Ar secsize 125.Ar secsize
126is the number of bytes per sector. 126is the number of bytes per sector.
127It must be an even multiple of 512. 127It must be an even multiple of 512.
128.Ar nsectors 128.Ar nsectors
129is the number of sectors per track. 129is the number of sectors per track.
130.Ar ntracks 130.Ar ntracks
131is the number of tracks per cylinder. 131is the number of tracks per cylinder.
132.Ar ncylinders 132.Ar ncylinders
133is the number of cylinders in the device. 133is the number of cylinders in the device.
134.It Fl F 134.It Fl F
135Force unconfiguration if the device is in use. 135Force unconfiguration if the device is in use.
136Does not imply 136Does not imply
137.Fl u . 137.Fl u .
138.It Fl f Ar disktab 138.It Fl f Ar disktab
139Specifies that the 139Specifies that the
140.Fl t 140.Fl t
141option should look up in 141option should look up in
142.Ar disktab 142.Ar disktab
143instead of in 143instead of in
144.Pa /etc/disktab . 144.Pa /etc/disktab .
145.It Fl l 145.It Fl l
146List the vnd devices and indicate which ones are in use. 146List the vnd devices and indicate which ones are in use.
147If a specific 147If a specific
148.Ar vnode_disk 148.Ar vnode_disk
149is given, then only that will be described. 149is given, then only that will be described.
150.It Fl t Ar typename 150.It Fl t Ar typename
151If configuring the device, look up 151If configuring the device, look up
152.Ar typename 152.Ar typename
153in 153in
154.Pa /etc/disktab 154.Pa /etc/disktab
155and use the geometry specified in the entry. 155and use the geometry specified in the entry.
156This option and the 156This option and the
157.Ar geomspec 157.Ar geomspec
158argument are mutually exclusive. 158argument are mutually exclusive.
159.It Fl r 159.It Fl r
160Configure the device as read-only. 160Configure the device as read-only.
161.It Fl u 161.It Fl u
162Unconfigures the device. 162Unconfigures the device.
163.It Fl v 163.It Fl v
164Print messages to stdout describing actions taken. 164Print messages to stdout describing actions taken.
165.It Fl z 165.It Fl z
166Assume that 166Assume that
167.Ar regular_file 167.Ar regular_file
168is a compressed disk image in cloop2 format, and configure it 168is a compressed disk image in cloop2 format, and configure it
169read-only. 169read-only.
170See the 170See the
171.Xr vndcompress 1 171.Xr vndcompress 1
172manpage on how to create such an image. 172manpage on how to create such an image.
173.El 173.El
174.Pp 174.Pp
175If no action option is given, 175If no action option is given,
176.Fl c 176.Fl c
177is assumed. 177is assumed.
178.Sh FILES 178.Sh FILES
179.Bl -tag -width /etc/disktab -compact 179.Bl -tag -width /etc/disktab -compact
180.It Pa /dev/rvnd?? 180.It Pa /dev/rvnd??
181.It Pa /dev/vnd?? 181.It Pa /dev/vnd??
182.It Pa /etc/disktab 182.It Pa /etc/disktab
183.El 183.El
184.Sh EXAMPLES 184.Sh EXAMPLES
185.Dl vnconfig vnd0 /tmp/diskimage 185.Dl vndconfig vnd0 /tmp/diskimage
186or 186or
187.Dl vnconfig /dev/rvnd0c /tmp/diskimage 187.Dl vndconfig /dev/rvnd0c /tmp/diskimage
188.Pp 188.Pp
189Configures the vnode disk 189Configures the vnode disk
190.Pa vnd0 . 190.Pa vnd0 .
191Please note that use of the second form of the command is discouraged because 191Please note that use of the second form of the command is discouraged because
192it requires knowledge of the raw partition which varies between architectures. 192it requires knowledge of the raw partition which varies between architectures.
193.Pp 193.Pp
194.Dl vnconfig vnd0 /tmp/floppy.img 512/18/2/80 194.Dl vndconfig vnd0 /tmp/floppy.img 512/18/2/80
195.Pp 195.Pp
196Configures the vnode disk 196Configures the vnode disk
197.Pa vnd0 197.Pa vnd0
198emulating the geometry of 512 bytes per sector, 18 sectors per track, 198emulating the geometry of 512 bytes per sector, 18 sectors per track,
1992 tracks per cylinder, and 80 cylinders total. 1992 tracks per cylinder, and 80 cylinders total.
200.Pp 200.Pp
201.Dl vnconfig -t floppy vnd0 /tmp/floppy.img 201.Dl vndconfig -t floppy vnd0 /tmp/floppy.img
202.Pp 202.Pp
203Configures the vnode disk 203Configures the vnode disk
204.Pa vnd0 204.Pa vnd0
205using the geometry specified in the 205using the geometry specified in the
206.Pa floppy 206.Pa floppy
207entry in 207entry in
208.Pa /etc/disktab . 208.Pa /etc/disktab .
209.Pp 209.Pp
210.Dl vnconfig -u vnd0 210.Dl vndconfig -u vnd0
211.Pp 211.Pp
212Unconfigures the 212Unconfigures the
213.Pa vnd0 213.Pa vnd0
214device. 214device.
215.Sh SEE ALSO 215.Sh SEE ALSO
216.Xr vndcompress 1 , 216.Xr vndcompress 1 ,
217.Xr opendisk 3 , 217.Xr opendisk 3 ,
218.Xr vnd 4 , 218.Xr vnd 4 ,
219.Xr mount 8 , 219.Xr mount 8 ,
220.Xr swapctl 8 , 220.Xr swapctl 8 ,
221.Xr umount 8 221.Xr umount 8
222.Sh HISTORY 222.Sh HISTORY
223The 223The
224.Nm 224.Nm
225command appeared in 225command appeared in
226.Nx 1.0 . 226.Nx 1.0 .
227.Sh BUGS 227.Sh BUGS
228This command should really be named 228This command should really be named
229.Nm vndconfig . 229.Nm vndconfig .