有块磁盘2TB,其中1TB分给了LVM,然后分出3个逻辑分区
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 253:0 0 300G 0 disk
└─vda1 253:1 0 300G 0 part /
vdb 253:16 0 2T 0 disk
└─vdb1 253:17 0 1000G 0 part
├─vg_ava-lv_docker 252:0 0 130G 0 lvm /var/lib/docker
├─vg_ava-lv_app 252:1 0 70G 0 lvm /ava_app
└─vg_ava-lv_data 252:2 0 800G 0 lvm /ava_data
(1)新建vdb2
fdisk /dev/vdb
n
p
2
w
(2)将新增的vdb2加入卷组
pvcreate /dev/vdb2
vgextend vg_ava /dev/vdb2
(3)扩容lv_data分区
lvextend -l +100%FREE /dev/vg/lv_data
resize2fs /dev/vg_ava/lv_data
(4)文件系统xfs扩容
xfs_growfs /dev/mapper/vg_ava-lv_data