1、添加新硬盘或者建立新分区
2、将建立好的分区制作成pv
pvcreate /dev/sda3
3、将新pv加入到根分区所在的卷组centos
vgextend centos /dev/sda3
4、根分区所在的lv扩容至30G
lvextend -L +30G /dev/centos/root
5、至此lv容量已扩容,接着改变文件系统容量:
xfs_growfs /dev/mapper/centos-root
meta-data=/dev/mapper/centos-root isize=512 agcount=4, agsize=524032 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=2096128, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 2096128 to 9436160
完成
原文地址:https://www.cnblogs.com/ValyrianSteel/p/12028960.html