metareplace - enable or replace components of submirrors or RAID5 metadevices
/usr/sbin/metareplace -h
/usr/sbin/metareplace [-s setname] -e mirror component
/usr/sbin/metareplace [-s setname] mirror component-old component-new
/usr/sbin/metareplace [-s setname] -e RAID component
/usr/sbin/metareplace [-s setname] [-f] RAID component-old component-new
The metareplace command is used to enable or replace components (slices) within a submirror or a RAID5 metadevice.
When you replace a component, the metareplace command automatically starts resyncing the new component with the rest of the metadevice. When the resync completes, the replaced component becomes readable and writable. If the failed component has been hot spare replaced, the hot spare is placed in the available state and made available for other hot spare replacements.
Note that the new component must be large enough to replace the old component.
A component may be in one of several states. The Last Erred and the Maintenance states require action. Always replace components in the Maintenance state first, followed by a resync and validation of data. After components requiring maintenance are fixed, validated, and resynced, components in the Last Erred state should be replaced. To avoid data loss, it is always best to back up all data before replacing Last Erred devices.
Root privileges are required for all of the following options except -h.
-e
-f
-h
-s setname
mirror
component
component-old
component-new
RAID
Example 1 Recovering from Error Condition in RAID5 Metadevice
This example shows how to recover when a single component in a RAID5 metadevice is errored.
# metareplace d10 c3t0d0s2 c5t0d0s2
In this example, a RAID5 metadevice d10 has an errored component, c3t0d0s2, replaced by a new component, c5t0d0s2.
Example 2 Use of -e After Physical Disk Replacement
This example shows the use of the -e option after a physical disk in a submirror (a submirror of mirror mymirror1, in this case) has been replaced.
# metareplace -e mymirror1 c1t4d0s2
Note: The replacement disk must be partitioned to match the disk it is replacing before running the metareplace command.
The following exit values are returned:
0
>0
See attributes(5) for descriptions of the following attributes:
|
mdmonitord(1M), metaclear(1M), metadb(1M), metadetach(1M), metahs(1M), metainit(1M), metaoffline(1M), metaonline(1M), metaparam(1M), metarecover(1M), metarename(1M), metaroot(1M), metaset(1M), metassist(1M), metastat(1M), metasync(1M), metattach(1M), md.tab(4), md.cf(4), mddb.cf(4), md.tab(4), attributes(5), md(7D)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |