标签:grant find tps system pvcreate e2fs git box 切换
参考:
https://gist.github.com/christopher-hopper/9755310
https://www.madcoder.cn/vagrant-box-resize.html
http://www.linuxidc.com/Linux/2012-07/66626.htm
步骤:
vagrant halt
cd ~/VirtualBox\ VMs/self_box
VBoxManage clonehd "box-disk1.vmdk" "clone-disk1.vdi" --format vdi
VBoxManage modifyhd "clone-disk1.vdi" --resize 20480 #20G
VBoxManage storageattach self_box --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium clone-disk1.vdi #不切换目录
vagrant up
fdisk /dev/sda
pvcreate /dev/sda3
vgextend vg_name /dev/sda3
#vgdisplay 查看vg_name
lvextend -l +100%FREE /dev/mapper/vg_logic_file #ls /dev/mapper/vg_name + tab 查看
vg_logic_file 通常为vg.*root
resize2fs /dev/mapper/
vg_logic_file
vagrant reload
#初始大小真的好坑还是自己制作box为好
end
标签:grant find tps system pvcreate e2fs git box 切换
原文地址:http://www.cnblogs.com/maxilo/p/7783065.html