Centos系统调整LVM卷的分区大小
一、VirtualBox虚拟介质管理器调整虚拟硬盘空间大小
二、GParted调整LVM分区大小
3、命令行调制LVM卷大小
[root@localhost ~]# vgs
VG #PV #LV #SN Attr VSize VFree
centos 1 3 0 wz--n- <299.00g 45.12g
[root@localhost ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home centos -wi-ao---- 200.00g
root centos -wi-ao---- 50.00g
swap centos -wi-ao---- <3.88g
[root@localhost ~]# df -lh
文件系统 容量 已用 可用 已用% 挂载点
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 9.3M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/mapper/centos-root 50G 19G 32G 38% /
/dev/loop1 145M 145M 0 100% /var/lib/snapd/snap/notepadqq/855
/dev/sda1 1014M 292M 723M 29% /boot
/dev/loop0 100M 100M 0 100% /var/lib/snapd/snap/core/11167
/dev/mapper/centos-home 200G 200G 144M 100% /home
SHARE 332G 262G 71G 79% /media/sf_SHARE
tmpfs 783M 12K 783M 1% /run/user/42
tmpfs 783M 0 783M 0% /run/user/0
[root@localhost ~]# lvextend -l +100%FREE /dev/mapper/centos-home
Size of logical volume centos/home changed from 200.00 GiB (51200 extents) to 245.12 GiB (62751 extents).
Logical volume centos/home successfully resized.
[root@localhost ~]# xfs_growfs /dev/mapper/centos-home
[root@localhost ~]# vgs
VG #PV #LV #SN Attr VSize VFree
centos 1 3 0 wz--n- <299.00g 0
[root@localhost ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home centos -wi-ao---- 245.12g
root centos -wi-ao---- 50.00g
swap centos -wi-ao---- <3.88g