HP-UX System Administrator's Guide: Logical Volume Management (5900-3028, March 2013)
Backing Up and Restoring Volume Group Configuration
It is important that volume group configuration information be saved whenever you make any
change to the configuration such as:
• Adding or removing disks to a volume group
• Changing the disks in a root volume group
• Creating or removing logical volumes
• Extending or reducing logical volumes
Unlike fixed disk partitions or nonpartitioned disks that begin and end at known locations on a
given disk, each volume group configuration is unique, changes, and uses space on several disks.
If you back up your volume group configuration, you can restore a corrupted or lost LVM
configuration in the event of a disk failure or corruption of your LVM configuration information.
The vgcfgbackup command creates or updates a backup file containing the volume group
configuration; it does not back up the data within your logical volumes. To simplify the backup
process, vgcfgbackup is invoked automatically whenever you make a configuration change as
a result of using any of the following commands:
lvmergelvlnbootlvextendlvcreatelvchange
vgcreatelvsplitlvrmbootlvremovelvreduce
vgmodifyvgextendvgchange
1
pvmovepvchange
vgreduce
1
For volume group Version 2.2 and higher, the vgchange command automatically takes a backup of the volume group
configuration during deactivation, provided they are not activated in read-only mode. In all earlier versions, there is no
automatic backup when vgchange is used.
When snapshots are involved, the volume group configuration changes with respect to the snapshot data unsharing
while writes are occurring on the snapshot tree. So, it is recommended that the automatic backup of the volume group
configuration not be overridden by the —A n option during volume group deactivation.
You can display LVM configuration information previously backed up with vgcfgbackup or
restore it using vgcfgrestore.
By default, vgcfgbackup saves the configuration of a volume group to the file
volume_group_name.conf in the default directory /etc/lvmconf/. You can override this
default directory setting for volume group Version 2.x by configuring a new path in the
LVMP_CONF_PATH_NON_BOOT variable in the /etc/lvmrc file. For more information see
vgcfgbackup(1M)
NOTE: After a cold installation of the HP-UX 11i v3 March 2010 release, the /etc/lvmrc file
will contain the LVMP_CONF_PATH_NON_BOOT variable definition as below:
LVMP_CONF_PATH_NON_BOOT=""
But if you have upgraded your system from earlier version to HP-UX 11i v3 March 2010, this
default definition will not exist. In such case, you can manually define the variable in /etc/lvmrc
to configure a new path.
You can also run vgcfgbackup at the command line, saving the backup file in any directory you
indicate. If you do, first run vgdisplay with the -v option to ensure that the all logical volumes
in the volume group are shown as available/syncd. If so, then run the following command:
# vgcfgbackup -f pathname/filename volume_group_name
If you use the -f option with vgcfgbackup to save the configuration file in a non-default location,
take note of and retain its location. For information on command options, see vgcfgbackup(1M).
Common LVM Tasks 69