作者:黄霖hy | 来源:互联网 | 2023-05-28 15:11
1.查看磁盘空间大小,使用df -h 命令。

2. 增加磁盘空间,例如下图使用VM虚拟机增加的方式。物理机直接安装挂载上去。

3. 使用fdisk /dev/sda, 创建新分区。

4.重启Linux操作系统,使用reboot命令。

5.创建物理卷 使用pvcreate /dev/sda3命令。

6.查看物理卷信息使用pvdisplay命令。

7.将新增加的分区/dev/sda3加入到根目录分区centos中:使用vgextend centos /dev/sda3命令。

8.查看卷组信息,使用vgdisplay命令。

9.增加centos大小,增加100G。使用lvresize -L +100G /dev/mapper/centos-root命令。

10.重新识别centos大小,使用xfs_growfs /dev/mapper/centos-root命令。

11.查看扩容后的大小 ,使用df -h命令。

来源: https://www.cnblogs.com/renshengruxi/p/11095167.html