Ubuntu – Increase space for Ubuntu Server on VirtualBox

disk-usage

I am running Ubuntu Server in VirtualBox (I am on a Mac) as a web development server. My Mysql server has stopped starting (and wont start) and I highly suspect it is because I have no disk space left so I am trying to increase the space available.

I used the disk resizer utility (VBoxManage modifyhd Ubuntu\ Server.vdi --resize 80000) to increase the disk size and then I booted into Ubuntu live and, using GParted, created a new 30gb partition. I made it an ext2 filesystem.

But when I boot I first see that this hasn't helped:

enter image description here

And here is the output from fdisk -l:

enter image description here

I am stuck at this part – how do I now tell my machine that it can use the new space so I don't get disk space errors?

UPDATE:

I deleted the 30gb partition I made and tried to just resize but I am unable to use Gparted to resize the partition because Gparted says lvm2 is not supported(?):

enter image description here

Best Answer

You made the wrong decision. You have to resize the partition instead of creating a new partition.

  1. Now boot from Gparted and delete the newly created 30Gb partition

  2. Resize the old partition and get the space you need

    To resize it, click ‘Resize/Move’ button

    enter image description here

  3. Next, use the slider to drag the line to the left to repartition the free space. The available free space is the area with the white background. Ubuntu is installed in the area with the yellow background. When you’re done, click ‘Resize/Move’ button to apply the changes.

    enter image description here

  4. Finally, review the changes and click ‘Apply’ to save.

    enter image description here

Related Question