VxVM : Veritas Disk Group Configuration – Backup and Restore

Disk group configuration backup and restoration allows you to backup and restore all configuration data for Veritas Volume Manager (VxVM) disk groups, and for VxVM objects such as volumes that are configured within the disk groups. Using  this feature, you can recover from corruption of a disk group’s configuration that is stored as metadata in the private region of a VM disk. After the disk group configuration has been restored, and the volume enabled, the user data in the public region is available again without the need to restore this from backup media.

The vxconfigbackupd daemon monitors changes to the VxVM configuration andautomatically records any configuration changes that occur. Two utilities,vxconfigbackup and vxconfigrestore, are provided for backing up and restoring a VxVM configuration for a disk group. When importing a disk group, any of the following errors indicate that the disk group configuration and/or disk private region headers have become corrupted:
VxVM vxconfigd ERROR V-5-1-569 Disk group group,Disk disk:Cannot auto-import group: reason



The reason for the error is usually one of the following:
  • Configuration records are inconsistent
  • Disk group has no valid configuration copies
  • Duplicate record in configuration
  • Errors in some configuration copies
  • Format error in configuration copy
  • Invalid block number
  • Invalid magic number

If VxVM cannot update a disk group’s configuration because of disk errors, it disables the disk group and displays the following error:
VxVM vxconfigd ERROR V-5-1-123 Disk group group: Disabled by errors

If such errors occur, you can restore the disk group configuration from a backup after you have corrected any underlying problem such as failed or disconnected hardware. Configuration data from a backup allows you to reinstall the private region headers of VxVM disks in a disk group whose headers have become damaged, to recreate a corrupted disk group configuration, or to recreate a disk group and the VxVM objects within it. You can also use the configuration data to recreate a disk group on another system if the original system is not available.


VxVM uses the disk group configuration daemon to monitor the configuration of disk groups, and to back up the configuration whenever it is changed. By default,the five most recent backups are preserved. If required, you can also back up a disk group configuration by running the vxconfigbackup command.

The following files record disk group configuration information:

/etc/vx/cbr/bk/diskgroup.dgid/dgid.dginfo Disk group information.

/etc/vx/cbr/bk/diskgroup.dgid/dgid.diskinfo Disk attributes.

/etc/vx/cbr/bk/diskgroup.dgid/dgid.binconfig Binary configuration copy.

/etc/vx/cbr/bk/diskgroup.dgid/dgid.cfgrec Configuration records in vxprint -m format.

Here diskgroup is the name of the disk group, and dgid is the disk group ID. If a disk group is to be recreated on another system, copy these files to that system.

To back up a disk group configuration, type the following command:

# /etc/vx/bin/vxconfigbackup diskgroup

To back up all disk groups, use this version of the command:

# /etc/vx/bin/vxconfigbackup


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

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.

To perform the precommit operation

Use the following command to perform a precommit analysis of the state of the disk group configuration, and to reinstall the disk headers where these have become corrupted:

# /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

Type the following command:

# /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 abandon restoration at the precommit stage

Type the following command:

# /etc/vx/bin/vxconfigrestore -d [-l directory] {diskgroup | dgid}

To perform the commit operation

To commit the changes that are required to restore the disk group configuration, use the following command:

# /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.


[endtab]

Ramdev

Ramdev

I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

1 Response

  1. October 6, 2015

    […] Read – Veritas Disk Group Configuration – Backup and Restore […]

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us