Requirements : 1. Hard disk format into physical volume PVPVCREATE/DEV/SDB/DEV/SDA
2. Create Volume group vgcreatevg1000/dev/sdb1/dev/sdb2# Create Volume Group "vg1000"
3. Increase the volume group capacity vgextendvg2000/dev/sdb2# The physical volume "/DEV/SDB2" into the volume group "vg2000"
4. Reduce VGREDUCEVG2000/DEV/SDB2
5. Delete vgremovevg1000
6. Conversion format vgchange-anvg1000# Set the volume group status to inactive vgconvert-m2v
1. Hard disk format into physical volume PV
Pvcreate/dev/sdb/dev/sda
2. Create a volume group
Vgcreate vg1000/dev/sdb1/dev/sdb2 #创建卷组 "vg1000"
3. Increase Volume Group capacity
Vgextend vg2000/dev/sdb2 #将物理卷 "/DEV/SDB2" into the volume group "vg2000"
4. Reduce
Vgreduce VG2000/DEV/SDB2
5. Delete
Vgremove vg1000
6. Conversion format
Vgchange-an vg1000 #设置卷组状态为非活动状态
vgconvert-m2 vg1000 #转换卷组为 "LVM2" format
vgconvert-m2 vg1000 #转换卷组为 "LVM2" format Volume group vg1000 successfully converted
Vgchange-ay vg1000 #设置卷组状态为活动状态 0 Logical Volume (s) in volume group ' vg1000 ' now active
1. Creating a logical Volume
Lvcreate-n mylv-l 2G Xiaoluo #-N name-l Size
2. Expansion
Lvextend-l +1G/DEV/XIAOLUO/MYLV
Resize2fs/dev/xiaoluo/mylv
Narrow
RESIZE2FS/DEV/XIAOLUO/MYLV 10G//The purpose of this command is to narrow down our filesystem and reduce our file system to 10G
E2fsck-f/DEV/XIAOLUO/MYLV//Use the E2FSCK command to check our file system
Vreduce-l -4g/dev/xiaoluo/mylv//Shrink 4G-sized logical volumes
CentOS Logical Volume Usage