HP-UX System Administrator's Guide: Logical Volume Management (762803-001, March 2014)

To back up a mirrored logical volume containing a file system, using lvsplit and lvmerge,
follow these steps:
1. Split the logical volume /dev/vg00/lvol1 into two separate logical volumes as follows:
# lvsplit /dev/vg00/lvol1
This creates the new logical volume /dev/vg00/lvol1b. The original logical volume /dev/
vg00/lvol1 remains online.
2. Perform a file system consistency check on the logical volume to be backed up as follows:
# fsck /dev/vg00/lvol1b
3. Mount the file system as follows:
# mkdir /backup_dir
# mount /dev/vg00/lvol1b /backup_dir
4. Perform the backup using the utility of your choice.
5. Unmount the file system as follows:
# umount /backup_dir
6. Merge the split logical volume back with the original logical volume as follows:
# lvmerge /dev/vg00/lvol1b /dev/vg00/lvol1
NOTE: lvsplit is not supported on snapshot logical volumes. lvmerge is not supported for
snapshots as well as logical volumes having snapshots.
3.3.21 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 if it has associated snapshots, provided the VG is activated neither in read-only mode
nor with -l option. This behavior was different in releases prior to 11i v3 March 2014 update, where the automatic
backup was done for volume group version 2.2 irrespective of the presence or absence of snapshots. In all earlier volume
group versions, there is no automatic backup when the vgchange command is used.
72 Administering LVM