[root@localhost ~]# vgdisplay --- Volume group --- VG Name vg_solusvm System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 2 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size <375.25 GiB PE Size 4.00 MiB Total PE 96063 Alloc PE / Size 96063 / <375.25 GiB Free PE / Size 0 / 0 VG UUID 66564J-eFy1-mhdP-r3dm-ZbMg-Yiuy-VmRZEk
使用vgremove删除分区
[root@localhost ~]# vgremove vg_solusvm Do you really want to remove volume group "vg_solusvm" containing 1 logical volumes? [y/n]: y Do you really want to remove active logical volume vg_solusvm/vg_solusvm? [y/n]: y Logical volume "vg_solusvm" successfully removed Volume group "vg_solusvm" successfully removed
使用fdisk -l查看LVM分区设备名称,可以看到在sda5上
[root@localhost ~]# fdisk -l
设备 Boot Start End Blocks Id System /dev/sda1 * 2048 1574911 786432 83 Linux /dev/sda2 1574912 253233151 125829120 83 Linux /dev/sda3 253233152 286787583 16777216 82 Linux swap / Solaris /dev/sda4 286787584 1073741823 393477120 5 Extended /dev/sda5 286789632 1073741823 393476096 8e Linux LVM
用vgcreate重新创建VG分区。
vgcreate -s 128M vg_solusvm /dev/sda5
创建完成后查看VG分区情况,如下即可。
[root@localhost ~]# vgdisplay --- Volume group --- VG Name vg_solusvm System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size 375.12 GiB PE Size 128.00 MiB Total PE 3001 Alloc PE / Size 0 / 0 Free PE / Size 3001 / 375.12 GiB VG UUID UmeAx2-iJFo-IJyH-eRn4-c9jw-l9Gd-IeWReH