Using vxconfigrestore to restore the Veritas private region

Article:TECH201366  |  Created: 2013-01-04  |  Updated: 2014-01-02  |  Article URL http://www.symantec.com/docs/TECH201366
Article Type
Technical Solution


Issue



Using vxconfigrestore to restore the Veritas private region.


Solution



 

This article is a part of a set on troubleshooting failed, or failing, disks. Click here to start at the beginning: http://www.symantec.com/docs/TECH200618

 


Table of Contents

Introduction
1. Verify the integrity of a configuration database backup
2. Back up the existing configuration
3. Deport the disk group to be restored
4. Restore the configuration
5. Commit the restoration




Introduction
(Back to top)

Use vxconfigrestore to restore a private region backup that was created with vxconfigbackup. A restore may be necessary if the private region of a diskgroup has been corrupted or lost. Vxconfigrestore does not restore data to the actual volumes.




1. Verify the integrity of a configuration database backup
(Back to top)

Before running vxconfigrestore, verify the integrity of the configuration database backup to ensure that the data being restored is correct. The integrity of the backup can be verified with vxprint.

 


Note: See this article for details on verifying the integrity of a configuration database backup

"Verifying the integrity of a configuration database backup"
http://www.symantec.com/docs/TECH201925





2. Back up the existing configuration
(Back to top)

Before running vxconfigrestore, complete these two steps to back up the existing configuration.

  • Make a copy of the directory that contains the existing vxconfigbackup files. By default, the vxconfigbackup files are stored under /etc/vx/cbr/bk. The location may be different if a manual backup was performed using the "-l" argument.
  • Use vxconfigbackup to create a new backup of the configuration.

 


Note: See this article for details on using vxconfigbackup:

"Using vxconfigbackup and vxprivutil to back up up the disk group configuration of the Veritas private region"
http://www.symantec.com/docs/TECH201329






3. Deport the disk group to be restored
(Back to top)


A disk group must be deported before running a restore with vxconfigrestore is possible. Attempting to run vxconfigrestore to an imported disk group will trigger the error "ERROR V-5-2-3705 Diskgroup datadg is currently online imported."

 


Note: In many environments, such as a cluster, additional considerations may be required before deporting a diskgroup. If any resources depend on the disk group, they may need to be taken offline before deporting the disk group.


Figure 1 - Using vxdg to deport a disk group


Syntax:

vxdg deport <disk_group>


Example:

# vxdg deport proddg
 





4. Restore the configuration
(Back to top)


By default, Volume Manager automatically creates periodic backups of the private region to /etc/vx/cbr/bk. If a manual backup was created in an alternate location, specify this location when running vxconfigrestore.

Figure 2 - Using vxconfigrestore to restore the private region to a disk


Syntax:

# vxconfigrestore -p -l /directory <disk_group>


Example, with typical output:

# vxconfigrestore -p -l /tmp/vxconfigbackup proddg

Diskgroup proddg configuration restoration started ......

Installing volume manager disk header for ams_wms0_59 ...
|
proddg's diskgroup configuration is restored (in precommit state).
Diskgroup can be accessed in read only and can be examined using
vxprint in this state.

Run:
  vxconfigrestore -l /tmp/vxconfigbackup -c proddg ==> to commit the restoration.
  vxconfigrestore -l /tmp/vxconfigbackup -d proddg ==> to abort the restoration.


Note: The configuration has been restored, but the restoration has not yet been committed. Vxprint can be used to review the restored configuration using before committing it.





5. Commit the restoration
(Back to top)


If the "-p" argument was used while running vxconfigrestore, the disk configuration is still in a "precommit" state. In this state, the volumes and configuration are read-only. The precommit state makes it possible to review the configuration before commiting the restoration. To abort the restoration, use the "-d" argument.

Figure 3 - Using vxconfigrestore to commit a restoration


Syntax:

# vxconfigrestore -l /directory -c <disk_group>


Example, with typical output:

# vxconfigrestore -l /tmp/vxconfigbackup -c proddg

Committing configuration restoration for diskgroup proddg ....

VxVM vxvol ERROR V-5-1-1198 Volume prodvol has no CLEAN or non-volatile ACTIVE plexes
proddg's diskgroup configuration restoration is committed.

 

 

 




Article URL http://www.symantec.com/docs/TECH201366


Terms of use for this information are found in Legal Notices