1metareplace(1M) System Administration Commands metareplace(1M)
2
3
4
6 metareplace - enable or replace components of submirrors or RAID5
7 metadevices
8
10 /usr/sbin/metareplace -h
11
12
13 /usr/sbin/metareplace [-s setname] -e mirror component
14
15
16 /usr/sbin/metareplace [-s setname] mirror component-old component-new
17
18
19 /usr/sbin/metareplace [-s setname] -e RAID component
20
21
22 /usr/sbin/metareplace [-s setname] [-f] RAID component-old component-new
23
24
26 The metareplace command is used to enable or replace components
27 (slices) within a submirror or a RAID5 metadevice.
28
29
30 When you replace a component, the metareplace command automatically
31 starts resyncing the new component with the rest of the metadevice.
32 When the resync completes, the replaced component becomes readable and
33 writable. If the failed component has been hot spare replaced, the hot
34 spare is placed in the available state and made available for other hot
35 spare replacements.
36
37
38 Note that the new component must be large enough to replace the old
39 component.
40
41
42 A component may be in one of several states. The Last Erred and the
43 Maintenance states require action. Always replace components in the
44 Maintenance state first, followed by a resync and validation of data.
45 After components requiring maintenance are fixed, validated, and
46 resynced, components in the Last Erred state should be replaced. To
47 avoid data loss, it is always best to back up all data before replacing
48 Last Erred devices.
49
51 Root privileges are required for all of the following options except
52 -h.
53
54 -e Transitions the state of component to the available
55 state and resyncs the failed component. If the failed
56 component has been hot spare replaced, the hot spare
57 is placed in the available state and made available
58 for other hot spare replacements. This command is use‐
59 ful when a component fails due to human error (for
60 example, accidentally turning off a disk), or because
61 the component was physically replaced. In this case,
62 the replacement component must be partitioned to match
63 the disk being replaced before running the metareplace
64 command.
65
66
67 -f Forces the replacement of an errored component of a
68 metadevice in which multiple components are in error.
69 The component determined by the metastat display to be
70 in the ``Maintenance'' state must be replaced first.
71 This option may cause data to be fabricated since mul‐
72 tiple components are in error.
73
74
75 -h Display help message.
76
77
78 -s setname Specifies the name of the diskset on which metareplace
79 will work. Using the -s option will cause the command
80 to perform its administrative function within the
81 specified diskset. Without this option, the command
82 will perform its function on local metadevices.
83
84
85 mirror The metadevice name of the mirror.
86
87
88 component The logical name for the physical slice (partition) on
89 a disk drive, such as /dev/dsk/c0t0d0s2.
90
91
92 component-old The physical slice that is being replaced.
93
94
95 component-new The physical slice that is replacing component-old.
96
97
98 RAID The metadevice name of the RAID5 device.
99
100
102 Example 1 Recovering from Error Condition in RAID5 Metadevice
103
104
105 This example shows how to recover when a single component in a RAID5
106 metadevice is errored.
107
108
109 # metareplace d10 c3t0d0s2 c5t0d0s2
110
111
112
113
114 In this example, a RAID5 metadevice d10 has an errored component,
115 c3t0d0s2, replaced by a new component, c5t0d0s2.
116
117
118 Example 2 Use of -e After Physical Disk Replacement
119
120
121 This example shows the use of the -e option after a physical disk in a
122 submirror (a submirror of mirror mymirror1, in this case) has been
123 replaced.
124
125
126 # metareplace -e mymirror1 c1t4d0s2
127
128
129
130
131 Note: The replacement disk must be partitioned to match the disk it is
132 replacing before running the metareplace command.
133
134
136 The following exit values are returned:
137
138 0 Successful completion.
139
140
141 >0 An error occurred.
142
143
145 See attributes(5) for descriptions of the following attributes:
146
147
148
149
150 ┌─────────────────────────────┬─────────────────────────────┐
151 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
152 ├─────────────────────────────┼─────────────────────────────┤
153 │Availability │SUNWmdu │
154 ├─────────────────────────────┼─────────────────────────────┤
155 │Interface Stability │Stable │
156 └─────────────────────────────┴─────────────────────────────┘
157
159 mdmonitord(1M), metaclear(1M), metadb(1M), metadetach(1M), metahs(1M),
160 metainit(1M), metaoffline(1M), metaonline(1M), metaparam(1M), metare‐
161 cover(1M), metarename(1M), metaroot(1M), metaset(1M), metassist(1M),
162 metastat(1M), metasync(1M), metattach(1M), md.tab(4), md.cf(4),
163 mddb.cf(4), md.tab(4), attributes(5), md(7D)
164
165
166
167
168
169
170SunOS 5.11 26 Mar 2006 metareplace(1M)