CentOS 7.6.1810 扩展根目录
1、查看现在磁盘容量:
df -h
2、查看所有磁盘:
fdisk -l

3、/dev/sdb是我新增的磁盘,编辑/dev/sdb :
fdisk /dev/sdb




4、更换/dev/sdb的类型 :
fdisk /dev/sdb

5、保存磁盘设置,并查看所有磁盘列表

6、创建pv :
pvcreate /dev/sdb1

7、扩展VG :
vgextend centos /dev/sdb1
[root@localhost ~]# vgextend centos00 /dev/sda3 Couldn't create temporary archive name.
如果出现上面的错误,
Most likely because your root partition is full.
Try clearing out some files in the root (/) partition before running vgextend
8、查看VG,并扩展根目录 :
vgs
lvextend -L +20G /dev/mapper/centos-root

9、查看硬盘挂载,发现没有变化???

10、需要更新一下哦 :
xfs_growfs /dev/mapper/centos-root

11、再次查看磁盘挂载,成功啦,哈哈哈
