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 METARECOVER 1M "Mar 26, 2006"
8 metarecover \- recover soft partition information
12 \fB/sbin/metarecover\fR [\fB-n\fR] [\fB-v\fR] [\fB-s\fR \fIsetname\fR] \fIcomponent\fR \fB-p\fR
17 \fB/sbin/metarecover\fR [\fB-n\fR] [\fB-v\fR] [\fB-s\fR \fIsetname\fR] \fIcomponent\fR \fB-p\fR {\fB-d\fR}
22 \fB/sbin/metarecover\fR [\fB-n\fR] [\fB-v\fR] [\fB-s\fR \fIsetname\fR] \fIcomponent\fR \fB-p\fR {\fB-m\fR}
28 The \fBmetarecover\fR command scans a specified component to look for soft
29 partition configuration information and to regenerate the configuration.
33 The following options are supported:
40 Recover soft partitions in the metadevice state database from the extent
41 headers on the device. Options \fB-d\fR and \fB-m\fR are mutually exclusive.
50 Regenerate the extent headers and reapplies them to the underlying device based
51 on the soft partitions listed in the metadevice state database. Options
52 \fB-d\fR and \fB-m\fR are mutually exclusive.
61 Do not actually perform the operation. Show the output or errors that would
62 have resulted from the operation, had it been run.
71 Regenerate soft partitions based on the metadevice state database or extent
72 headers on the underlying device. If neither \fB-d\fR nor \fB-m\fR are
73 specified, this option compares the soft partition information in the
74 metadevice state database to the extent headers.
80 \fB\fB-s\fR \fIsetname\fR\fR
83 Specify the name of the diskset on which \fBmetarecover\fR works. Using the
84 \fBs\fR option causes the command to perform its function within the specified
85 diskset. Without the \fB-s\fR option, the \fBmetarecover\fR command operates on
86 the metadevices and/or hot spare pools in the local diskset.
88 This option is required to recover former \fBsps\fR from a diskset component or
89 raw-device. \fIsetname\fR must be identical to the former \fIsetname\fR in
90 which the \fBsps\fR were created. The set numbers, however, seem irrelevant.
99 Verbose mode, displaying the changes being made.
105 The following operand is supported:
109 \fB\fIcomponent\fR\fR
112 Specifies the \fBc*t*d*s*\fR number of the disk or slice containing the
113 partitions, or the device name (for example, \fBd10\fR) of the metadevice
114 containing the partitions.
116 \fIcomponent\fR can be a slice name, component name, \fB/dev/dsk path\fR, or
117 \fB/dev/rdsk path\fR.
122 \fBExample 1 \fRUpdating Metadevice State Database Based on Disk Extent Headers
125 A disk containing soft partitions is moved from one system to another. The
126 system administrator would like to use the existing soft partitions.
127 \fBmetarecover\fR updates the metadevice state database based on the extent
133 # metarecover -v c0t3d0s2 -p -d
139 \fBExample 2 \fRUpdating Metadevice State Database Based on Incomplete Soft
143 A system crashes in the middle of creating a new soft partition. The soft
144 partition is in the creating state and the driver does not let that device be
145 opened. \fBmetarecover\fR rewrites the extent headers for the partially created
146 soft partition and mark it as \fBOkay\fR.
151 # metarecover -v c0t3d0s2 -p -m
157 \fBExample 3 \fRUpdating Extent Headers Based on Metadevice State Database
160 Someone accidentally overwrote a portion of a disk leaving extent headers
161 destroyed. \fBmetarecover\fR rewrites the extent headers to ensure a valid soft
162 partition configuration, though user data is not recovered.
167 # metarecover -v d5 -m
174 The following example implements the same command using a descriptive name.
179 # metarecover -v myvolume -m
185 \fBExample 4 \fRValidating Soft Partition Configuration
188 To validate the existing soft partition configuration, use \fBmetarecover\fR
189 with only the \fB-p\fR flag.
194 # metarecover c0t3d0s2 -p
202 The following exit values are returned:
209 Successful completion.
224 See \fBattributes\fR(5) for descriptions of the following attributes:
232 ATTRIBUTE TYPE ATTRIBUTE VALUE
234 Interface Stability Stable
240 \fBmdmonitord\fR(1M), \fBmetaclear\fR(1M), \fBmetadb\fR(1M),
241 \fBmetadetach\fR(1M), \fBmetahs\fR(1M), \fBmetainit\fR(1M),
242 \fBmetaoffline\fR(1M), \fBmetaonline\fR(1M), \fBmetaparam\fR(1M),
243 \fBmetarename\fR(1M), \fBmetareplace\fR(1M), \fBmetaroot\fR(1M),
244 \fBmetaset\fR(1M), \fBmetassist\fR(1M), \fBmetastat\fR(1M), \fBmetasync\fR(1M),
245 \fBmetattach\fR(1M), \fBmd.tab\fR(4), \fBmd.cf\fR(4), \fBmddb.cf\fR(4),
246 \fBmd.tab\fR(4), \fBattributes\fR(5), \fBmd\fR(7D)