Combining Volume Groups; Backing Up Volume Group Metadata; Renaming A Volume Group - Red Hat ENTERPRISE LINUX 5 - LOGICAL VOLUME MANAGER ADMINISTRATION Manual

Hide thumbs Also See for ENTERPRISE LINUX 5 - LOGICAL VOLUME MANAGER ADMINISTRATION:
Table of Contents

Advertisement

Combining Volume Groups

Logical volumes cannot be split between volume groups. Each existing logical volume must be entirely
on the physical volumes forming either the old or the new volume group. If necessary, however, you
can use the pvmove command to force the split.
The following example splits off the new volume group smallvg from the original volume group
bigvg.
# vgsplit bigvg smallvg /dev/ram15
Volume group "smallvg" successfully split from "bigvg"
4.3.11. Combining Volume Groups
Two combine two volume groups into a single volume group, use the vgmerge command. You can
merge an inactive "source" volume with an active or an inactive "destination" volume if the physical
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
29

Advertisement

Table of Contents
loading

Table of Contents