I encountered an error message when installing Cloud Foundry in Ubuntu with VirtualBox installation.

After cleaning up with these three commands, the results are still not good enough:

Sudo apt-get AutoClean sudo apt-get autoclean

(2) Sudo apt-get clean

(3) Clean up isolated software packages no longer needed by the system. sudo apt-get autoremove

I decided to set the ubuntu VM disk size to 30 gigabytes.

Run the vboxmanage. exe list HDDS command to view the current disk space.

Use the command vboxmanage.exe modifyHD –resize to change the size. When I change it to 30 grams,

You have seen the size in effect in VirtualBox.

The ubuntu command sudo fdisk -l shows that the new disk size has taken effect.

However, the size of the file system queried by df -h remains unchanged.

Run sudo fdisk /dev/sda and select n to create a new partition of type P and number 3. Note that the start of the new partition must be close to the end of the existing Linux LVM partition, as shown below. As for the end position, I simply specified an increase of 15G, so the end position is calculated dynamically.

If the following information is displayed, the partition has been created successfully.

Change the type of the new partition to 8E :Linux LVM

The next step is to create a new Physical volume sudo pvcreate /dev/sda3

Sudo pvScan shows that the physical volume has not been allocated to volume group Ubuntu-vg

Use the sudo vgextend ubuntu-vg /dev/sda3 command to allocate:

The allocation is complete.

Then change the volume group size: sudo lvextend -l +100%FREE /dev/mapper/ubuntu–vg-root

Final step:

sudo resize2fs /dev/mapper/ubuntu–vg-root

The/directory has been successfully expanded: