7712 mandoc -Tlint does always exit with error code 0
[unleashed.git] / usr / src / man / man1m / metassist.1m
blobfa12abdc90792e2dbd75f048d6e56aeb06fd906f
1 '\" te
2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH METASSIST 1M "Feb 22, 2005"
7 .SH NAME
8 metassist \- automated volume creation utility to support Solaris Volume
9 Manager
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBmetassist\fR \fB-V\fR
14 .fi
16 .LP
17 .nf
18 \fBmetassist\fR \fB-?\fR
19 .fi
21 .LP
22 .nf
23 \fBmetassist\fR create [\fB-v\fR \fIn\fR] [\fB-c\fR] \fB-F\fR \fIconfig_file\fR
24 .fi
26 .LP
27 .nf
28 \fBmetassist\fR create [\fB-v\fR \fIn\fR] [\fB-c\fR | \fB-d\fR] \fB-F\fR \fIrequest_file\fR
29 .fi
31 .LP
32 .nf
33 \fBmetassist\fR create [\fB-v\fR \fIn\fR] [\fB-c\fR | \fB-d\fR] [\fB-f\fR] [\fB-n\fR \fIname\fR]
34      [\fB-p\fR \fIdatapaths\fR] [\fB-r\fR \fIredundancy\fR]
35      [\fB-a\fR \fIavailable\fR [,\fIavailable\fR,\&.\|.\|.]]
36      [\fB-u\fR \fIunavailable\fR [,\fIunavailable\fR,\&.\|.\|.]] \fB-s\fR \fIsetname\fR \fB-S\fR \fIsize\fR
37 .fi
39 .LP
40 .nf
41 \fBmetassist\fR create \fB-?\fR
42 .fi
44 .SH DESCRIPTION
45 .sp
46 .LP
47 The \fBmetassist\fR command provides assistance, through automation, with
48 common Solaris Volume Manager tasks.
49 .SS "SUBCOMMANDS"
50 .sp
51 .LP
52 The following subcommands are supported:
53 .sp
54 .ne 2
55 .na
56 \fB\fBcreate\fR\fR
57 .ad
58 .RS 10n
59 The \fBcreate\fR subcommand creates one or more Solaris Volume Manager volumes.
60 You can specify this request on the command line or in a file specified on the
61 command line.
62 .sp
63 If you create a volume using the command line, you can specify the
64 characteristics of the volume in terms of the desired quality of service it
65 will provide - its size, the number of redundant copies of the data it
66 contains, the number of data paths by which it is accessible, and whether
67 faulty components are replaced automatically. The diskset in which the volume
68 will reside and the volume's size must be specified on the command line in this
69 form of the command.
70 .sp
71 If you create a volume using a request in a file, you can specify the
72 characteristics of the volume in terms of the quality of service they provide,
73 as on the command line. Alternatively, the file can specify the types and
74 component parts of the volume, (for example, mirrors, stripes, concatenations,
75 and their component slices). The file may also specify volumes partly in terms
76 of their types and partly in terms of their component parts, and may specify
77 the characteristics of more than one volume. All volumes specified in a file
78 must reside in the same diskset, whose name must be specified in the file.
79 .sp
80 If you specify the \fB-c\fR or \fB-d\fR option on the command line, the command
81 runs without creating an actual volume or volumes. Instead, it outputs either a
82 a Bourne shell command script (\fB-c\fR option) or a volume configuration
83 (\fB-d\fR option). The command script, when run, creates the specified volume
84 or volumes. The volume configuration specifies the volume or volumes in
85 complete detail, naming all their components.
86 .sp
87 The input file given on the command line can take one of the following forms:
88 .RS +4
89 .TP
90 .ie t \(bu
91 .el o
92 a volume request, which specifies a request for a volume with explicit
93 attributes and components, or matching a given quality of service
94 .RE
95 .RS +4
96 .TP
97 .ie t \(bu
98 .el o
99 a volume configuration, produced by a previous execution of the command
103 .SH OPTIONS
106 The following option is mandatory if you specify a volume request or volume
107 configuration in a file:
109 .ne 2
111 \fB\fB-F\fR \fIconfig_file\fR | \fIrequest_file\fR\fR
113 .sp .6
114 .RS 4n
115 Specify the volume request or volume configuration file to process. If
116 \fIconfig_file\fR or \fIrequest_file\fR is \fB-\fR, it is read from standard
117 input.
119 The \fB-d\fR option cannot be specified when \fIinputfile\fR is a volume
120 configuration file.
125 The following options are mandatory if you specify a volume request on the
126 command line:
128 .ne 2
130 \fB\fB-s\fR \fIset\fR\fR
132 .RS 11n
133 Specify the disk set to use when creating volumes. All the volumes and hot
134 spare pools are created in this disk set. If necessary, disks are moved into
135 the diskset for use in the volumes and hot spare pools. If the diskset doesn't
136 exist the command creates it. This option is required. \fBmetassist\fR works
137 entirely within a named disk set. Use of the local, or unnamed disk set, is not
138 allowed.
142 .ne 2
144 \fB\fB-S\fR \fIsize\fR\fR
146 .RS 11n
147 Specify the size of the volume to be created. The size argument consists of a
148 numeric value (a decimal can be specified) followed by KB, MB, GB, or TB,
149 indicating kilobytes, megabytes, gigabytes, or terabytes, respectively. Case is
150 ignored when interpreting this option. This option is required.
155 The following options are optional command line parameters:
157 .ne 2
159 \fB\fB-a\fR \fIdevice1\fR\fB,\fR\fIdevice2\fR\fB,...\fR\fR
161 .RS 26n
162 Explicitly specify the devices that can be used in the creation of this volume.
163 Named devices may be controllers or disks. Only used when specifying a volume
164 on the command line.
168 .ne 2
170 \fB\fB-c\fR\fR
172 .RS 26n
173 Output the command script that would implement the specified or generated
174 volume configuration. The command script is not run, and processing stops at
175 this stage.
179 .ne 2
181 \fB\fB-d\fR\fR
183 .RS 26n
184 Output the volume configuration that satisfies the specified or generated
185 volume request. No command script is generated or executed, and processing
186 stops at this stage.
190 .ne 2
192 \fB\fB-f\fR\fR
194 .RS 26n
195 Specify whether the volume should support automatic component replacement after
196 a fault. If this option is specified, a mirror is created and its submirrors
197 are associated with a hot spare.
201 .ne 2
203 \fB\fB-n\fR \fIname\fR\fR
205 .RS 26n
206 Specify the name of the new volume. See \fBmetainit\fR(1M) for naming
207 guidelines.
211 .ne 2
213 \fB\fB-p\fR \fIn\fR\fR
215 .RS 26n
216 Specify the number of required paths to the storage volume. The value of
217 \fIn\fR cannot be greater than the number of different physical paths and
218 logical paths to attached storage. Only used when specifying a volume on the
219 command line.
223 .ne 2
225 \fB\fB-r\fR \fIn\fR\fR
227 .RS 26n
228 Specify the redundancy level (\fB0\fR-\fB4\fR) of the data. The default is
229 \fB0\fR. Only used when specifying a volume on the command line. If redundancy
230 is \fB0\fR, a stripe is created. If redundancy is \fB1\fR or greater, a mirror
231 with this number of submirrors is created. In this case, the volume can suffer
232 a disk failure on \fIn\fR\fB-1\fR copies without data loss. With the use of hot
233 spares (see the \fB-f\fR option), a volume can suffer a disk failure on
234 \fIn\fR\fB+hsps-1\fR volumes without data loss, assuming non-concurrent
235 failures.
239 .ne 2
241 \fB\fB-u\fR \fIdevice1\fR\fB,\fR\fIdevice2\fR\fB,...\fR\fR
243 .RS 26n
244 Explicitly specify devices to exclude in the creation of this volume. Named
245 devices can be controllers or disks. You can use this option alone, or to
246 exclude some of the devices listed as available with the \fB-a\fR option, Only
247 used when specifying a volume on the command line.
251 .ne 2
253 \fB\fB-v\fR \fIvalue\fR\fR
255 .RS 26n
256 Specify the level of verbosity. Values from \fB0\fR to \fB2\fR are available,
257 with higher numbers specifying more verbose output when the command is run.
258 \fB-v\fR \fB0\fR indicates silent output, except for errors or other critical
259 messages. The default level is \fB1\fR.
263 .ne 2
265 \fB\fB-V\fR\fR
267 .RS 26n
268 Display program version information.
272 .ne 2
274 \fB\fB-?\fR\fR
276 .RS 26n
277 Display help information. This option can follow a subcommand for
278 subcommand-specific help.
281 .SH EXAMPLES
283 \fBExample 1 \fRCreating a Mirror
286 The following example creates a two-way, 36Gb mirror on available devices from
287 controller 1 and controller 2. It places the volume in diskset \fBmirrorset\fR.
290 .in +2
292 # metassist create -r 2 -a c1,c2 -s mirrorset -S 36GB
294 .in -2
298 \fBExample 2 \fRCreating a Mirror with Additional Fault Tolerance
301 The following example creates a two-way, 36Gb mirror on available devices from
302 controller 1 and controller 2. It provides additional fault tolerance in the
303 form of a hot spare. It places the volume in diskset \fBmirrorset\fR.
306 .in +2
308 # metassist create -f -r 2 -a c1,c2 -s mirrorset -S 36GB
310 .in -2
314 \fBExample 3 \fRCreating a Three-way Mirror and Excluding Devices
317 The following example creates a three-way, 180Gb mirror from storage devices on
318 controller 1 or controller 2. It excludes the disks \fBc1t2d0\fR and
319 \fBc2t2d1\fR from the volume. It places the volume in diskset \fBmirrorset\fR.
322 .in +2
324 metassist create -r 3 -a c1,c2 -u c1t2d0, c2t2d1 \e
325         -s mirrorset -S 180GB
327 .in -2
331 \fBExample 4 \fRDetermining and Implementing a Configuration
334 The following example determines and implements a configuration satisfying the
335 request specified in a request file:
338 .in +2
340 # metassist create -F request.xml
342 .in -2
346 \fBExample 5 \fRDetermining a Configuration and Saving It in a volume-config
347 File
350 The following example determines a configuration which satisfies the given
351 request. It saves the configuration in a volume-config file without
352 implementing it:
355 .in +2
357 # metassist create -d -F request.xml > volume-config
359 .in -2
363 \fBExample 6 \fRDetermining a Configuration and Saving It in a Shell Script
366 The following example determines a configuration which satisfies the given
367 request. It saves the configuration in a shell script without implementing it:
370 .in +2
372 # metassist create -c -F request.xml > setupvols.sh
374 .in -2
378 \fBExample 7 \fRImplementing the Given volume-config
381 The following example implements the given volume-config:
384 .in +2
386 # metassist create -F config.xml
388 .in -2
392 \fBExample 8 \fRConverting the Given volume-config to a Shell Script
395 The following example converts the given volume-config to a shell script that
396 you can run later:
399 .in +2
401 # metassist create -c -F config.xml > setupvols.sh
403 .in -2
406 .SH EXIT STATUS
409 The following exit values are returned:
411 .ne 2
413 \fB\fB0\fR\fR
415 .RS 6n
416 Successful completion.
420 .ne 2
422 \fB>\fB0\fR\fR
424 .RS 6n
425 An error occurred.
428 .SH FILES
430 .ne 2
432 \fB\fB/usr/share/lib/xml/dtd/volume-request.dtd\fR\fR
434 .sp .6
435 .RS 4n
440 .ne 2
442 \fB\fB/usr/share/lib/xml/dtd/volume-defaults.dtd\fR\fR
444 .sp .6
445 .RS 4n
450 .ne 2
452 \fB\fB/usr/share/lib/xml/dtd/volume-config.dtd\fR\fR
454 .sp .6
455 .RS 4n
459 .SH ATTRIBUTES
462 See \fBattributes\fR(5) for descriptions of the following attributes:
467 box;
468 c | c
469 l | l .
470 ATTRIBUTE TYPE  ATTRIBUTE VALUE
472 Inteface Stability      Stable
475 .SH SEE ALSO
478 \fBmdmonitord\fR(1M), \fBmetaclear\fR(1M), \fBmetadb\fR(1M),
479 \fBmetadetach\fR(1M), \fBmetahs\fR(1M), \fBmetainit\fR(1M),
480 \fBmetaoffline\fR(1M), \fBmetaonline\fR(1M), \fBmetaparam\fR(1M),
481 \fBmetarecover\fR(1M), \fBmetarename\fR(1M), \fBmetareplace\fR(1M),
482 \fBmetaroot\fR(1M), \fBmetaset\fR(1M), \fBmetastat\fR(1M), \fBmetasync\fR(1M),
483 \fBmetattach\fR(1M), \fBmd.tab\fR(4), \fBmd.cf\fR(4), \fBmddb.cf\fR(4),
484 \fBmd.tab\fR(4), \fBvolume-config\fR(4), \fBvolume-request\fR(4),
485 \fBattributes\fR(5), \fBmd\fR(7D)
486 .SH NOTES
489 The quality of service arguments are mutually exclusive with the \fB-F\fR
490 \fIinputfile\fR argument.
493 When specifying a request file or quality of service arguments on the command
494 line, the \fB/etc/default/metassist.xml\fR file is read for global and per-disk
495 set defaults.
498 Characteristics of this file are specified in the DTD, in
499 \fB/usr/share/lib/xml/dtd/volume-defaults.dtd\fR.
502 Characteristics of the XML request file are specified in the DTD, in
503 \fB/usr/share/lib/xml/dtd/volume-request.dtd\fR.
506 Characteristics of the XML configuration file are specified in the DTD, in
507 \fB/usr/share/lib/xml/dtd/volume-config.dtd\fR.
510 This command must be run as root.
513 This command requires a functional Solaris Volume Manager configuration before
514 it runs.