vgconvert

Convert volume group metadata format

Supplementary instructions

vgconvert command is used to convert the metadata format of the specified LVM volume group, usually converting the "LVM1" format volume group to the "LVM2" format. Before converting volume group metadata, the volume group must be in an inactive state, otherwise the conversion operation cannot be completed.

grammar

vgconvert(options)(parameters)

Options

-M: The volume group format to be converted.

Parameters

Volume group: Specify the volume group to be converted.

Example

Before converting the volume group metadata format, use the vgchange command to set the volume group to inactive status. Enter the following command at the command line:

[root@localhost lvm]# vgchange -an vg1000 #Set the volume group status to inactive
0 logical volume(s) in volume group "vg1000" now active

```shell

Use the vgconvert command to convert volume group "vg1000" from "LVM1" format to "LVM2" format. Enter the following command at the command line:

```shell
[root@localhost lvm]# vgconvert -M2 vg1000 #Convert the volume group to "LVM2" format
Volume group vg1000 successfully converted

Use the vgchange command to set the volume group to active status. Enter the following command at the command line:

[root@localhost lvm]# vgchange -ay vg1000 #Set the volume group status to active
0 logical volume(s) in volume group "vg1000" now active