You can use the vxconfigrestore utility to restore or recreate a disk group from its configuration backup. The restoration process consists of a precommit operation followed by a commit operation. At the precommit stage, you can examine the configuration of the disk group that would be restored from the backup. The actual disk group configuration is not permanently restored until you choose to commit the changes.
Warning: |
None of the disks or VxVM objects in the disk groups should be open or in use by any application while the restoration is being performed. |
You can choose whether or not any corrupted disk headers are to be reinstalled at the precommit stage. If any of the disks' private region headers are invalid, restoration may not be possible without reinstalling the headers for the affected disks.
See the vxconfigrestore(1M) manual page.
To perform the precommit operation
# /etc/vx/bin/vxconfigrestore -p [-l directory] \ {diskgroup | dgid}
The disk group can be specified either by name or by ID.
The -l option allows you to specify a directory for the location of the backup configuration files other than the default location, /etc/vx/cbr/bk.
To specify that the disk headers are not to be reinstalled
# /etc/vx/bin/vxconfigrestore -n [-l directory] \ {diskgroup | dgid}
At the precommit stage, you can use the vxprint command to examine the configuration that the restored disk group will have. You can choose to proceed to commit the changes and restore the disk group configuration. Alternatively, you can cancel the restoration before any permanent changes have been made.
To perform the commit operation
# /etc/vx/bin/vxconfigrestore -c [-l directory] \ {diskgroup | dgid}
If no disk headers are reinstalled, the configuration copies in the disks' private regions are updated from the latest binary copy of the configuration that was saved for the disk group.
If any of the disk headers are reinstalled, a saved copy of the disks' attributes is used to recreate their private and public regions. These disks are also assigned new disk IDs. The VxVM objects within the disk group are then recreated using the backup configuration records for the disk group. This process also has the effect of creating new configuration copies in the disk group.
Volumes are synchronized in the background. For large volume configurations, it may take some time to perform the synchronization. You can use the vxtask -l list command to monitor the progress of this operation.
Disks that are in use or whose layout has been changed are excluded from the restoration process.
If the back-up is taken of a shared disk group, the vxconfigrestore command restores it as a private disk group. After the disk group is restored, run the following commands to make the disk group shared.