| @@ -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 |
86 | The | | 86 | The |
87 | .Nm | | 87 | .Nm |
88 | command configures vnode pseudo disk devices. | | 88 | command configures vnode pseudo disk devices. |
89 | It will associate the vnode disk | | 89 | It will associate the vnode disk |
90 | .Ar vnode_disk | | 90 | .Ar vnode_disk |
91 | with the regular file | | 91 | with the regular file |
92 | .Ar regular_file | | 92 | .Ar regular_file |
93 | allowing the latter to be accessed as though it were a 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 | | 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. | | 95 | or can contain a filesystem that is mounted in the name space. |
96 | The | | 96 | The |
97 | .Ar vnode_disk | | 97 | .Ar vnode_disk |
98 | is a special file of raw partition or name of vnode disk like | | 98 | is a special file of raw partition or name of vnode disk like |
99 | .Pa vnd0 . | | 99 | .Pa vnd0 . |
100 | .Pp | | 100 | .Pp |
101 | Options indicate an action to be performed: | | 101 | Options indicate an action to be performed: |
102 | .Bl -tag -width indent | | 102 | .Bl -tag -width indent |
103 | .It Fl c | | 103 | .It Fl c |
104 | Configures the device. | | 104 | Configures the device. |
105 | If successful, references to | | 105 | If successful, references to |
106 | .Ar vnode_disk | | 106 | .Ar vnode_disk |
107 | will access the contents of | | 107 | will access the contents of |
108 | .Ar regular_file . | | 108 | .Ar regular_file . |
109 | .Pp | | 109 | .Pp |
110 | If | | 110 | If |
111 | .Ar geomspec | | 111 | .Ar geomspec |
112 | is specified, the vnode device will emulate the specified disk geometry. | | 112 | is specified, the vnode device will emulate the specified disk geometry. |
113 | The format of the | | 113 | The format of the |
114 | .Ar geomspec | | 114 | .Ar geomspec |
115 | argument is: | | 115 | argument 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 |
123 | If geometry is not specified, the kernel will choose a default based on 1MB | | 123 | If geometry is not specified, the kernel will choose a default based on 1MB |
124 | cylinders. | | 124 | cylinders. |
125 | .Ar secsize | | 125 | .Ar secsize |
126 | is the number of bytes per sector. | | 126 | is the number of bytes per sector. |
127 | It must be an even multiple of 512. | | 127 | It must be an even multiple of 512. |
128 | .Ar nsectors | | 128 | .Ar nsectors |
129 | is the number of sectors per track. | | 129 | is the number of sectors per track. |
130 | .Ar ntracks | | 130 | .Ar ntracks |
131 | is the number of tracks per cylinder. | | 131 | is the number of tracks per cylinder. |
132 | .Ar ncylinders | | 132 | .Ar ncylinders |
133 | is the number of cylinders in the device. | | 133 | is the number of cylinders in the device. |
134 | .It Fl F | | 134 | .It Fl F |
135 | Force unconfiguration if the device is in use. | | 135 | Force unconfiguration if the device is in use. |
136 | Does not imply | | 136 | Does not imply |
137 | .Fl u . | | 137 | .Fl u . |
138 | .It Fl f Ar disktab | | 138 | .It Fl f Ar disktab |
139 | Specifies that the | | 139 | Specifies that the |
140 | .Fl t | | 140 | .Fl t |
141 | option should look up in | | 141 | option should look up in |
142 | .Ar disktab | | 142 | .Ar disktab |
143 | instead of in | | 143 | instead of in |
144 | .Pa /etc/disktab . | | 144 | .Pa /etc/disktab . |
145 | .It Fl l | | 145 | .It Fl l |
146 | List the vnd devices and indicate which ones are in use. | | 146 | List the vnd devices and indicate which ones are in use. |
147 | If a specific | | 147 | If a specific |
148 | .Ar vnode_disk | | 148 | .Ar vnode_disk |
149 | is given, then only that will be described. | | 149 | is given, then only that will be described. |
150 | .It Fl t Ar typename | | 150 | .It Fl t Ar typename |
151 | If configuring the device, look up | | 151 | If configuring the device, look up |
152 | .Ar typename | | 152 | .Ar typename |
153 | in | | 153 | in |
154 | .Pa /etc/disktab | | 154 | .Pa /etc/disktab |
155 | and use the geometry specified in the entry. | | 155 | and use the geometry specified in the entry. |
156 | This option and the | | 156 | This option and the |
157 | .Ar geomspec | | 157 | .Ar geomspec |
158 | argument are mutually exclusive. | | 158 | argument are mutually exclusive. |
159 | .It Fl r | | 159 | .It Fl r |
160 | Configure the device as read-only. | | 160 | Configure the device as read-only. |
161 | .It Fl u | | 161 | .It Fl u |
162 | Unconfigures the device. | | 162 | Unconfigures the device. |
163 | .It Fl v | | 163 | .It Fl v |
164 | Print messages to stdout describing actions taken. | | 164 | Print messages to stdout describing actions taken. |
165 | .It Fl z | | 165 | .It Fl z |
166 | Assume that | | 166 | Assume that |
167 | .Ar regular_file | | 167 | .Ar regular_file |
168 | is a compressed disk image in cloop2 format, and configure it | | 168 | is a compressed disk image in cloop2 format, and configure it |
169 | read-only. | | 169 | read-only. |
170 | See the | | 170 | See the |
171 | .Xr vndcompress 1 | | 171 | .Xr vndcompress 1 |
172 | manpage on how to create such an image. | | 172 | manpage on how to create such an image. |
173 | .El | | 173 | .El |
174 | .Pp | | 174 | .Pp |
175 | If no action option is given, | | 175 | If no action option is given, |
176 | .Fl c | | 176 | .Fl c |
177 | is assumed. | | 177 | is 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 |
186 | or | | 186 | or |
187 | .Dl vnconfig /dev/rvnd0c /tmp/diskimage | | 187 | .Dl vndconfig /dev/rvnd0c /tmp/diskimage |
188 | .Pp | | 188 | .Pp |
189 | Configures the vnode disk | | 189 | Configures the vnode disk |
190 | .Pa vnd0 . | | 190 | .Pa vnd0 . |
191 | Please note that use of the second form of the command is discouraged because | | 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. | | 192 | it 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 |
196 | Configures the vnode disk | | 196 | Configures the vnode disk |
197 | .Pa vnd0 | | 197 | .Pa vnd0 |
198 | emulating the geometry of 512 bytes per sector, 18 sectors per track, | | 198 | emulating the geometry of 512 bytes per sector, 18 sectors per track, |
199 | 2 tracks per cylinder, and 80 cylinders total. | | 199 | 2 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 |
203 | Configures the vnode disk | | 203 | Configures the vnode disk |
204 | .Pa vnd0 | | 204 | .Pa vnd0 |
205 | using the geometry specified in the | | 205 | using the geometry specified in the |
206 | .Pa floppy | | 206 | .Pa floppy |
207 | entry in | | 207 | entry 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 |
212 | Unconfigures the | | 212 | Unconfigures the |
213 | .Pa vnd0 | | 213 | .Pa vnd0 |
214 | device. | | 214 | device. |
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 |
223 | The | | 223 | The |
224 | .Nm | | 224 | .Nm |
225 | command appeared in | | 225 | command appeared in |
226 | .Nx 1.0 . | | 226 | .Nx 1.0 . |
227 | .Sh BUGS | | 227 | .Sh BUGS |
228 | This command should really be named | | 228 | This command should really be named |
229 | .Nm vndconfig . | | 229 | .Nm vndconfig . |