CentOS / RHEL : How to convert volume group metadata between LVM1 and LVM2

The volume group metadata contains all the configuration information about the VG. It can be used to recover a deleted or corrupted VG. By default, the system will backup LVM2 automatically when LVM2 metadata has been changed by lvm utility such as lvcreate or vgchange etc. The metadata backup is stored in /etc/lvm/backup directory. To backup the metadata of current system, just copy the files contained in /etc/lvm/backup to another place.

Volume group metadata can be converted from LVM1 to LVM2 and vice versa using the vgconvert command.

Convert VG metadata from LVM1 to LVM2

If you want to convert volume group metadata from LVM1 to LVM2 format, use the -M2 option with the vgconvert command.

# vgconvert -M2 [vg_name]

Convert VG metadata from LVM2 to LVM1

If you want to convert volume group metadat from LVM2 to LVM1 format, use the -M1 option with the vgconvert command.

# vgconvert -M1 [vg_name]

To get more info on the vgconvert command check the man page.

# man vgconvert
Related Post