Solaris Volume Manager configuration files contain basic Solaris Volume Manager information, as well as most of the data that is necessary to reconstruct a configuration. The following procedures illustrate how to work with these files.
# metastat -p > /etc/lvm/md.tab
This file contains all parameters for use by the metainit command and metahs command. Use this file if you need to set up several similar environments or if you need to recreate the configuration after a system failure.
On occasion, your system loses the information maintained in the state database. For example, this loss might occur if the system was rebooted after all of the state database replicas were deleted. As long as no volumes were created after the state database was lost, you can use the md.cf or md.tab files to recover your Solaris Volume Manager configuration.
Note - The md.cf file does not maintain information on active hot spares. Thus, if hot spares were in use when the Solaris Volume Manager configuration was lost, those volumes that were using active hot spares are likely corrupted.
See Creating State Database Replicas for more information.
If you are attempting to recover the last known Solaris Volume Manager configuration, copy the md.cf file into the /etc/lvm/md.tab file.
If you are creating a new Solaris Volume Manager configuration based on a copy of the md.tab file that have you preserved, copy the preserved file into the /etc/lvm/md.tab file.
If you are creating a new configuration or recovering a configuration after a crash, configure the mirrors as one-way mirrors. For example:
d80 -m d81 1 d81 1 1 c1t6d0s3
If the submirrors of a mirror are not the same size, be sure to use the smallest submirror for this one-way mirror. Otherwise, data could be lost.
If you are recovering an existing configuration and Solaris Volume Manager was cleanly stopped, leave the mirror configuration as multi-way mirrors. For example:
d70 -m d71 d72 1 d71 1 1 c1t6d0s2 d72 1 1 c1t5d0s0
Specify RAID-5 volumes with the -k option, to prevent reinitialization of the device. For example:
d45 -r c1t3d0s5 c1t3d0s3 c1t3d0s4 -k -i 32b
See the metainit(1M) man page for more information.
# metainit -n md.tab-entry
# metainit -n -a
The metainit command does not maintain a hypothetical state of the devices that might have been created while running with the -n, so creating volumes that rely on other, nonexistent volumes will result in errors with the -n even though the command may succeed without the -n option.
Specifies not to actually create the devices. Use this option to verify that the results are as you expected.
Specifies the name of the component to initialize.
Specifies to check all components.
# metainit -a
Specifies to activate the entries in the /etc/lvm/md.tab file.
# mettach mirror submirror