Last active
August 29, 2015 14:03
-
-
Save brihter/52bf7817d1eb6d6cc6d2 to your computer and use it in GitHub Desktop.
resize virtualbox image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# resize | |
# 25600 = 25 * 1024MB | |
VBoxManage clonehd "NAME.vmdk" "NAME_CLONE.vdi" --format vdi | |
VBoxManage modifyhd "NAME_CLONE.vdi" --resize 25600 | |
VBoxManage clonehd "NAME_CLONE.vdi" "NAME1.vmdk" --format vmdk | |
# download gparted iso and mount it in virtualbox | |
# extend the partition in gparted, apply changes | |
# unmount the iso | |
# reboot the machine | |
sudo su | |
lvm vgdisplay | |
# => Free PE / Size 122880 / 480.00 GiB | |
lvm lvdisplay /dev/VolGroup/lv_root | |
# => Current LE 3978 | |
# Calculate the sum of the values above. In this case : 122880 + 3978 = 126858 <- will be used in the next command | |
lvm lvresize -l 126858 /dev/VolGroup/lv_root | |
resize2fs /dev/VolGroup/lv_root | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment