Installation guide

Backing Up Volume Group Metadata
31
extent sizes of the volume are equal and the physical and logical volume summaries of both volume
groups fit into the destination volume groups limits.
The following command merges the inactive volume group my_vg into the active or inactive volume
group databases giving verbose runtime information.
# vgmerge -v databases my_vg
4.3.12. Backing Up Volume Group Metadata
Metadata backups and archives are automatically created on every volume group and logical volume
configuration change unless disabled in the lvm.conf file. By default, the metadata backup is stored
in the /etc/lvm/backup file and the metadata archives are stored in the /etc/lvm/archives
file. You can manually back up the metadata to the /etc/lvm/backup file with the vgcfgbackup
command.
The vgcfrestore command restores the metadata of a volume group from the archive to all the
physical volumes in the volume groups.
For an example of using the vgcfgrestore command to recover physical volume metadata, see
Section 6.4, “Recovering Physical Volume Metadata”.
4.3.13. Renaming a Volume Group
Use the vgrename command to rename an existing volume group.
Either of the following commands renames the existing volume group vg02 to my_volume_group
# vgrename /dev/vg02 /dev/my_volume_group
# vgrename vg02 my_volume_group
4.3.14. Moving a Volume Group to Another System
You can move an entire LVM volume group to another system. It is recommended that you use the
vgexport and vgimport commands when you do this.
The vgexport command makes an inactive volume group inaccessible to the system, which allows
you to detach its physical volumes. The vgimport command makes a volume group accessible to a
machine again after the vgexport command has made it inactive.
To move a volume group form one system to another, perform the following steps:
1. Make sure that no users are accessing files on the active volumes in the volume group, then
unmount the logical volumes.
2. Use the -a n argument of the vgchange command to mark the volume group as inactive, which
prevents any further activity on the volume group.