/template/Home/AllNew/PC/Static

Centos7如何将第二块磁盘使用LVM扩容?

发布时间:2019/11/15 15:05:00

1、查看第二块磁盘;

https://www.tzcloud.com/pic/image/20191115/6.png

2、pvcreate /dev/vdb;

https://www.tzcloud.com/pic/image/20191115/7.png

3、pvdisplay,查看添加成功的/dev/vdb的大小为20G;

https://www.tzcloud.com/pic/image/20191115/8.png

4、vgextend centos /dev/vdb,其中centos为VG Name;

https://www.tzcloud.com/pic/image/20191115/9.png

5、提示可用空间5119,将整个vdb磁盘分配到/dev/centos/root,命令:lvextend -l +5119 /dev/centos/root;

https://www.tzcloud.com/pic/image/20191115/10.png

https://www.tzcloud.com/pic/image/20191115/11.png

6、resize2fs  /dev/centos/root命令报错了,这就是centos7和centos6细微的差别了;

https://www.tzcloud.com/pic/image/20191115/12.png

7、Centos7使用命令:xfs_growfs /dev/centos/root,磁盘容量由41G变成了241G,扩容成功;

https://www.tzcloud.com/pic/image/20191115/13.png

  • 文章来源:腾正云

在线咨询