2

I'm very new to Virtual Machines and not brilliant with computers as a whole (and this is the first time I've used Linux). I created a VM with too little hard drive space, so managed to do some research and resize the disk. I then used GParted to do it "properly"

The problem is that according to the Ubuntu image I'm using I'm nearly out of memory, which according to System Monitor is 7.2GB.

VirtualBox shows me that I have the virtual space, but not actual space

enter image description here

What do I need to do to use the full virtual space (or should I say convert virtual space to actual space)?

EDIT

This is what I see when I load the VM up

enter image description here

System Monitor

enter image description here

EDIT as per Zina's request in comments

Output of pvdisplay

enter image description here

Output of vgdisplay

enter image description here

Output of lvdisplay

enter image description here

What do I need to do to use the full space?

1 Answers1

6

Thanks for adding the lvm information asked for.

You have to do the following (as root or add sudo in front):

lvextend /dev/ubuntu-vg/root -l +100%FREE - this will add all free space from the volume group to the root partition

resize2fs /dev/ubuntu-vg/root - this will resize the filesytem to the extended size

df -h - this will show you the new space layout.

EDIT: here some LVM sources to read for more information:

RedHat - CHAPTER 5. LVM CONFIGURATION EXAMPLES

Ubuntu - Wiki LVM

Zina
  • 2,327