7712 mandoc -Tlint does always exit with error code 0
[unleashed.git] / usr / src / man / man1m / metareplace.1m
blobfbdf90c8bcca30e59a5fc0b25e2aea877ac34022
1 '\" te
2 .\" Copyright (c) 2003, 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 METAREPLACE 1M "Mar 26, 2006"
7 .SH NAME
8 metareplace \- enable or replace components of submirrors or RAID5 metadevices
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sbin/metareplace\fR \fB-h\fR
13 .fi
15 .LP
16 .nf
17 \fB/usr/sbin/metareplace\fR [\fB-s\fR \fIsetname\fR] \fB-e\fR \fImirror\fR \fIcomponent\fR
18 .fi
20 .LP
21 .nf
22 \fB/usr/sbin/metareplace\fR [\fB-s\fR \fIsetname\fR] \fImirror\fR \fIcomponent-old\fR \fIcomponent-new\fR
23 .fi
25 .LP
26 .nf
27 \fB/usr/sbin/metareplace\fR [\fB-s\fR \fIsetname\fR] \fB-e\fR \fIRAID\fR \fIcomponent\fR
28 .fi
30 .LP
31 .nf
32 \fB/usr/sbin/metareplace\fR [\fB-s\fR \fIsetname\fR] [\fB-f\fR] \fIRAID\fR \fIcomponent-old\fR \fIcomponent-new\fR
33 .fi
35 .SH DESCRIPTION
36 .sp
37 .LP
38 The \fBmetareplace\fR command is used to enable or replace components (slices)
39 within a submirror or a RAID5 metadevice.
40 .sp
41 .LP
42 When you replace a component, the \fBmetareplace\fR command automatically
43 starts resyncing the new component with the rest of the metadevice. When the
44 resync completes, the replaced component becomes readable and writable. If the
45 failed component has been hot spare replaced, the hot spare is placed in the
46 available state and made available for other hot spare replacements.
47 .sp
48 .LP
49 Note that the new component must be large enough to replace the old component.
50 .sp
51 .LP
52 A component may be in one of several states. The \fBLast\fR \fBErred\fR and the
53 \fBMaintenance\fR states require action. Always replace components in the
54 \fBMaintenance\fR state first, followed by a resync and validation of data.
55 After components requiring maintenance are fixed, validated, and resynced,
56 components in the \fBLast\fR \fBErred\fR state should be replaced. To avoid
57 data loss, it is always best to back up all data before replacing \fBLast\fR
58 \fBErred\fR devices.
59 .SH OPTIONS
60 .sp
61 .LP
62 Root privileges are required for all of the following options except \fB-h\fR.
63 .sp
64 .ne 2
65 .na
66 \fB\fB-e\fR\fR
67 .ad
68 .RS 17n
69 Transitions the state of \fIcomponent\fR to the available state and resyncs the
70 failed component. If the failed component has been hot spare replaced, the hot
71 spare is placed in the available state and made available for other hot spare
72 replacements. This command is useful when a component fails due to human error
73 (for example, accidentally turning off a disk), or because the component was
74 physically replaced. In this case, the replacement component must be
75 partitioned to match the disk being replaced before running the
76 \fBmetareplace\fR command.
77 .RE
79 .sp
80 .ne 2
81 .na
82 \fB\fB-f\fR\fR
83 .ad
84 .RS 17n
85 Forces the replacement of an errored component of a metadevice in which
86 multiple components are in error. The component determined by the
87 \fBmetastat\fR display to be in the ``Maintenance'' state must be replaced
88 first. This option may cause data to be fabricated since multiple components
89 are in error.
90 .RE
92 .sp
93 .ne 2
94 .na
95 \fB\fB-h\fR\fR
96 .ad
97 .RS 17n
98 Display help message.
99 .RE
102 .ne 2
104 \fB\fB-s\fR \fB\fIsetname\fR\fR\fR
106 .RS 17n
107 Specifies the name of the diskset on which \fBmetareplace\fR will work. Using
108 the \fB-s\fR option will cause the command to perform its administrative
109 function within the specified diskset. Without this option, the command will
110 perform its function on local metadevices.
114 .ne 2
116 \fB\fImirror\fR\fR
118 .RS 17n
119 The metadevice name of the mirror.
123 .ne 2
125 \fB\fIcomponent\fR\fR
127 .RS 17n
128 The logical name for the physical slice (partition) on a disk drive, such as
129 \fB/dev/dsk/c0t0d0s2\fR.
133 .ne 2
135 \fB\fIcomponent-old\fR\fR
137 .RS 17n
138 The physical slice that is being replaced.
142 .ne 2
144 \fB\fIcomponent-new\fR\fR
146 .RS 17n
147 The physical slice that is replacing \fIcomponent-old\fR.
151 .ne 2
153 \fB\fIRAID\fR\fR
155 .RS 17n
156 The metadevice name of the RAID5 device.
159 .SH EXAMPLES
161 \fBExample 1 \fRRecovering from Error Condition in RAID5 Metadevice
164 This example shows how to recover when a single component in a RAID5 metadevice
165 is errored.
168 .in +2
170 # metareplace d10 c3t0d0s2 c5t0d0s2
172 .in -2
177 In this example, a RAID5 metadevice \fBd10\fR has an errored component,
178 \fBc3t0d0s2\fR, replaced by a new component, \fBc5t0d0s2\fR.
181 \fBExample 2 \fRUse of \fB-e\fR After Physical Disk Replacement
184 This example shows the use of the \fB-e\fR option after a physical disk in a
185 submirror (a submirror of mirror \fBmymirror1\fR, in this case) has been
186 replaced.
189 .in +2
191 # metareplace -e mymirror1 c1t4d0s2
193 .in -2
198 Note: The replacement disk must be partitioned to match the disk it is
199 replacing before running the \fBmetareplace\fR command.
201 .SH EXIT STATUS
204 The following exit values are returned:
206 .ne 2
208 \fB\fB0\fR\fR
210 .RS 6n
211 Successful completion.
215 .ne 2
217 \fB\fB>0\fR\fR
219 .RS 6n
220 An error occurred.
223 .SH ATTRIBUTES
226 See \fBattributes\fR(5) for descriptions of the following attributes:
231 box;
232 c | c
233 l | l .
234 ATTRIBUTE TYPE  ATTRIBUTE VALUE
236 Interface Stability     Stable
239 .SH SEE ALSO
242 \fBmdmonitord\fR(1M), \fBmetaclear\fR(1M), \fBmetadb\fR(1M),
243 \fBmetadetach\fR(1M), \fBmetahs\fR(1M), \fBmetainit\fR(1M),
244 \fBmetaoffline\fR(1M), \fBmetaonline\fR(1M), \fBmetaparam\fR(1M),
245 \fBmetarecover\fR(1M), \fBmetarename\fR(1M), \fBmetaroot\fR(1M),
246 \fBmetaset\fR(1M), \fBmetassist\fR(1M), \fBmetastat\fR(1M), \fBmetasync\fR(1M),
247 \fBmetattach\fR(1M), \fBmd.tab\fR(4), \fBmd.cf\fR(4), \fBmddb.cf\fR(4),
248 \fBmd.tab\fR(4), \fBattributes\fR(5), \fBmd\fR(7D)
251 \fI\fR