metarecover - recover soft partition information
/usr/sbin/metarecover [-n] [-v] [-s setname] component -p
/usr/sbin/metarecover [-n] [-v] [-s setname] component -p {-d}
/usr/sbin/metarecover [-n] [-v] [-s setname] component -p {-m}
The metarecover command scans a specified component to look for soft partition configuration information and to regenerate the configuration.
The following options are supported:
Recover soft partitions in the metadevice state database from the extent headers on the device. Options –d and –m are mutually exclusive.
Regenerate the extent headers and reapplies them to the underlying device based on the soft partitions listed in the metadevice state database. Options –d and –m are mutually exclusive.
Do not actually perform the operation. Show the output or errors that would have resulted from the operation, had it been run.
Regenerate soft partitions based on the metadevice state database or extent headers on the underlying device. If neither –d nor –m are specified, this option compares the soft partition information in the metadevice state database to the extent headers.
Specify the name of the diskset on which metarecover works. Using the s option causes the command to perform its function within the specified diskset. Without the – s option, the metarecover command operates on the metadevices and/or hot spare pools in the local diskset.
This option is required to recover former sps from a diskset component or raw-device. setname must be identical to the former setname in which the sps were created. The set numbers, however, seem irrelevant.
Verbose mode, displaying the changes being made.
The following operand is supported:
Specifies the c*t*d*s* number of the disk or slice containing the partitions, or the device name (for example, d10) of the metadevice containing the partitions.
component can be a slice name, component name, /dev/dsk path, or /dev/rdsk path.
A disk containing soft partitions is moved from one system to another. The system administrator would like to use the existing soft partitions. metarecover updates the metadevice state database based on the extent headers on the disk.
# metarecover -v c0t3d0s2 -p -d使用例 2 Updating Metadevice State Database Based on Incomplete Soft Partition Creation
A system crashes in the middle of creating a new soft partition. The soft partition is in the creating state and the driver does not let that device be opened. metarecover rewrites the extent headers for the partially created soft partition and mark it as Okay.
# metarecover -v c0t3d0s2 -p -m使用例 3 Updating Extent Headers Based on Metadevice State Database
Someone accidentally overwrote a portion of a disk leaving extent headers destroyed. metarecover rewrites the extent headers to ensure a valid soft partition configuration, though user data is not recovered.
# metarecover -v d5 -m
The following example implements the same command using a descriptive name.
# metarecover -v myvolume -m使用例 4 Validating Soft Partition Configuration
To validate the existing soft partition configuration, use metarecover with only the –p flag.
# metarecover c0t3d0s2 -p
The following exit values are returned:
Successful completion.
An error occurred.
See attributes(7) for descriptions of the following attributes:
|
md(4D), md.cf(5), md.tab(5), md.tab(5), mddb.cf(5), attributes(7), metattach(8), mdmonitord(8), metaclear(8), metadb(8), metadetach(8), metahs(8), metainit(8), metaoffline(8), metaonline(8), metaparam(8), metarename(8), metareplace(8), metaset(8), metassist(8), metastat(8), metasync(8)