1. 關閉虛擬機器
poweroff
2. 以指令增加資料卷容量
VBoxManage modifyhd "D:\VDI\CentOS7.vdi" --resize 40960 (40G)
3. 虛擬機器設定 EFI 開機並掛載 GParted
https://downloads.sourceforge.net/project/gparted/gparted-live-stable/0.31.0-1/gparted-live-0.31.0-1-i686.iso
4. 使用 GParted 開機並 Resize 磁區後 Apply 關機, 取消虛擬機器的 EFI 開機並載卸 GParted
5. 進入系統取得 LV Path
lvdisplay
6. 重新大小 LV Path
lvresize -l +100%FREE /dev/centos/root
7. 重新大小 xfs
xfs_growfs /dev/centos/root
ref:
http://oldgrayduck.blogspot.com/2016/07/virtualbox-centos.html