1metarecover(1M) System Administration Commands metarecover(1M)
2
3
4
6 metarecover - recover soft partition information
7
9 /sbin/metarecover [-n] [-v] [-s setname] component -p
10
11
12 /sbin/metarecover [-n] [-v] [-s setname] component -p {-d}
13
14
15 /sbin/metarecover [-n] [-v] [-s setname] component -p {-m}
16
17
19 The metarecover command scans a specified component to look for soft
20 partition configuration information and to regenerate the configura‐
21 tion.
22
24 The following options are supported:
25
26 -d Recover soft partitions in the metadevice state database
27 from the extent headers on the device. Options -d and -m
28 are mutually exclusive.
29
30
31 -m Regenerate the extent headers and reapplies them to the
32 underlying device based on the soft partitions listed in
33 the metadevice state database. Options -d and -m are
34 mutually exclusive.
35
36
37 -n Do not actually perform the operation. Show the output or
38 errors that would have resulted from the operation, had
39 it been run.
40
41
42 -p Regenerate soft partitions based on the metadevice state
43 database or extent headers on the underlying device. If
44 neither -d nor -m are specified, this option compares the
45 soft partition information in the metadevice state data‐
46 base to the extent headers.
47
48
49 -s setname Specify the name of the diskset on which metarecover
50 works. Using the s option causes the command to perform
51 its function within the specified diskset. Without the -s
52 option, the metarecover command operates on the metade‐
53 vices and/or hot spare pools in the local diskset.
54
55 This option is required to recover former sps from a
56 diskset component or raw-device. setname must be identi‐
57 cal to the former setname in which the sps were created.
58 The set numbers, however, seem irrelevant.
59
60
61 -v Verbose mode, displaying the changes being made.
62
63
65 The following operand is supported:
66
67 component Specifies the c*t*d*s* number of the disk or slice con‐
68 taining the partitions, or the device name (for example,
69 d10) of the metadevice containing the partitions.
70
71 component can be a slice name, component name, /dev/dsk
72 path, or /dev/rdsk path.
73
74
76 Example 1 Updating Metadevice State Database Based on Disk Extent Head‐
77 ers
78
79
80 A disk containing soft partitions is moved from one system to another.
81 The system administrator would like to use the existing soft parti‐
82 tions. metarecover updates the metadevice state database based on the
83 extent headers on the disk.
84
85
86 # metarecover -v c0t3d0s2 -p -d
87
88
89
90 Example 2 Updating Metadevice State Database Based on Incomplete Soft
91 Partition Creation
92
93
94 A system crashes in the middle of creating a new soft partition. The
95 soft partition is in the creating state and the driver does not let
96 that device be opened. metarecover rewrites the extent headers for the
97 partially created soft partition and mark it as Okay.
98
99
100 # metarecover -v c0t3d0s2 -p -m
101
102
103
104 Example 3 Updating Extent Headers Based on Metadevice State Database
105
106
107 Someone accidentally overwrote a portion of a disk leaving extent head‐
108 ers destroyed. metarecover rewrites the extent headers to ensure a
109 valid soft partition configuration, though user data is not recovered.
110
111
112 # metarecover -v d5 -m
113
114
115
116
117 The following example implements the same command using a descriptive
118 name.
119
120
121 # metarecover -v myvolume -m
122
123
124
125 Example 4 Validating Soft Partition Configuration
126
127
128 To validate the existing soft partition configuration, use metarecover
129 with only the -p flag.
130
131
132 # metarecover c0t3d0s2 -p
133
134
135
137 The following exit values are returned:
138
139 0 Successful completion.
140
141
142 >0 An error occurred.
143
144
146 See attributes(5) for descriptions of the following attributes:
147
148
149
150
151 ┌─────────────────────────────┬─────────────────────────────┐
152 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
153 ├─────────────────────────────┼─────────────────────────────┤
154 │Availability │SUNWmdr │
155 ├─────────────────────────────┼─────────────────────────────┤
156 │Interface Stability │Stable │
157 └─────────────────────────────┴─────────────────────────────┘
158
160 mdmonitord(1M), metaclear(1M), metadb(1M), metadetach(1M), metahs(1M),
161 metainit(1M), metaoffline(1M), metaonline(1M), metaparam(1M), metare‐
162 name(1M), metareplace(1M), metaroot(1M), metaset(1M), metassist(1M),
163 metastat(1M), metasync(1M), metattach(1M), md.tab(4), md.cf(4),
164 mddb.cf(4), md.tab(4), attributes(5), md(7D)
165
166
167
168
169
170
171SunOS 5.11 26 Mar 2006 metarecover(1M)