发布时间:2022-03-31 18:27:12编辑:文明阅读(1130)
实验环境:
[root@centos72 ~]# cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) [root@centos72 ~]# uname -a Linux centos72 3.10.0-327.4.5.el7.x86_64 #1 SMP Mon Jan 25 22:07:14 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
【参考链接】https://github.com/sprotheroe/vagrant-disksize
[root@centos72 ~]# vagrant plugin install vagrant-disksize
重启前如图:
重启中如图:
重启后如图:
[root@cenos72 ~]# pvcreate /dev/sda3 Physical volume "/dev/sda3" successfully created
[root@centos72~]# vgextend centos /dev/sda3 Volume group "centos" successfully extended
[root@centos72 ~]# lvresize -L +10G /dev/mapper/centos-root
[root@centos72 ~]# xfs_growfs /dev/mapper/centos-root
[root@centos72 ~]# df -hT
7
4
4
2
2