Installation guide

Table Of Contents
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 4, “Recovering Physical Volume Metadata”.
3.12. 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
3.13. 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 al-
lows you to detach its physical volumes. The vgimport command makes a volume group ac-
cessible 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.
3. Use the vgexport command to export the volume group. This prevents it from being ac-
cessed by the system from which you are removing it.
After you export the volume group, the physical volume will show up as being in an expor-
ted volume group when you execute the pvscan command, as in the following example.
[root@tng3-1]# pvscan
PV /dev/sda1 is in exported VG myvg [17.15 GB / 7.15 GB free]
PV /dev/sdc1 is in exported VG myvg [17.15 GB / 15.15 GB free]
PV /dev/sdd1 is in exported VG myvg [17.15 GB / 15.15 GB free]
...
3.12. Renaming a Volume Group
27