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"
8 metareplace \- enable or replace components of submirrors or RAID5 metadevices
12 \fB/usr/sbin/metareplace\fR \fB-h\fR
17 \fB/usr/sbin/metareplace\fR [\fB-s\fR \fIsetname\fR] \fB-e\fR \fImirror\fR \fIcomponent\fR
22 \fB/usr/sbin/metareplace\fR [\fB-s\fR \fIsetname\fR] \fImirror\fR \fIcomponent-old\fR \fIcomponent-new\fR
27 \fB/usr/sbin/metareplace\fR [\fB-s\fR \fIsetname\fR] \fB-e\fR \fIRAID\fR \fIcomponent\fR
32 \fB/usr/sbin/metareplace\fR [\fB-s\fR \fIsetname\fR] [\fB-f\fR] \fIRAID\fR \fIcomponent-old\fR \fIcomponent-new\fR
38 The \fBmetareplace\fR command is used to enable or replace components (slices)
39 within a submirror or a RAID5 metadevice.
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.
49 Note that the new component must be large enough to replace the old component.
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
62 Root privileges are required for all of the following options except \fB-h\fR.
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.
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
104 \fB\fB-s\fR \fB\fIsetname\fR\fR\fR
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.
119 The metadevice name of the mirror.
125 \fB\fIcomponent\fR\fR
128 The logical name for the physical slice (partition) on a disk drive, such as
129 \fB/dev/dsk/c0t0d0s2\fR.
135 \fB\fIcomponent-old\fR\fR
138 The physical slice that is being replaced.
144 \fB\fIcomponent-new\fR\fR
147 The physical slice that is replacing \fIcomponent-old\fR.
156 The metadevice name of the RAID5 device.
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
170 # metareplace d10 c3t0d0s2 c5t0d0s2
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
191 # metareplace -e mymirror1 c1t4d0s2
198 Note: The replacement disk must be partitioned to match the disk it is
199 replacing before running the \fBmetareplace\fR command.
204 The following exit values are returned:
211 Successful completion.
226 See \fBattributes\fR(5) for descriptions of the following attributes:
234 ATTRIBUTE TYPE ATTRIBUTE VALUE
236 Interface Stability Stable
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)