Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Need help figuring out why Ubuntu is mis-reporting disk capacity on a VM. Just installed Ubuntu 12.04 Server LTS 64 bit on a Virtualbox (version 4.2.10) virtual machine. I also installed the Ubuntu desktop on this server.

I created the virtual disk (VDI option) as 8GB with the Dynamically allocated option. Virtualbox currently reports the actual size at 1.7GB


The Ubuntu Disk Usage Analyzer shows the drive has a total capacity of 4.2GB which makes no sense.

Disk Usage Analyzer

I pulled this info from the command line and it doesn't match the GUI report. It adds up to just under 8GB which is right. I'm unclear about why "udev" and "tmpfs" both are allocated at 2GB since this a new install.

Command line

I installed GParted and it shows the extended partition correctly to be be 7.6GB.


So why is the Gui misreporting drive capacity and how do I fix this? I can't install anything else because I'm getting warnings in the desktop about there only being 25MB of space left. I already ran 'sudo apt-get clean' and it did nothing. I also tried resizing the VDI disk itself from the my hosts command line but an error:

c:\VBoxManage modifyhd ozzman2.vdi --resize 20000
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage.exe: error: Resize hard disk operation for this format is not implemented yet!
share|improve this question
Run a lvs on the command line. You may need to resize the logical volume to use all the available space. – Steve-o Apr 10 '13 at 19:12
I got this from lvs: root ubuntu1 -wi-ao 3.73g swap_1 ubuntu1 -wi-ao 4.00g. What is swap_1 and why is it taking up that much space? – TugboatCaptain Apr 10 '13 at 20:03
up vote 3 down vote accepted

You have 4GB space used as virtual memory aka swap.

You will probably want to assign more disk for storage. There are a couple of choices but the simplest and most expedient is usually to recreate the installation with a larger size. Alternatives include:

  1. Resize the disk within VirtualBox, extend the physical extent, then the logical extend, then the ext4 file system afterwards.
  2. Add a new disk to the virtual host and add that to LVM as a new physical volume and extend the root logical volume to use that space, subsequently extend the ext4 file system to use the new space.
  3. Add a new disk and mount somewhere new e.g. /opt and use that as desired.

Random article on Google that may assist:

share|improve this answer
#1 pretty much covered it, but @mdpc also helped with his comments too. took me a while to google all this stuff and figure out how to do this via the command line. not fun or easy for beginner. – TugboatCaptain Apr 11 '13 at 0:08

Of course, the 1.7 GBytes is the actual size on the underlying physical disk that is allocated.

The virtual host assumes that the full amount is present, but the underlying Hypervisor will create the necessary storage as needed. If you are wondering where your disk allocation has gone, I'd use fdisk and check the size of each partition.

In the case of LVM, it may be that some of the physical volume although allocated is not in a Logical volume yet. Look at vgdisplay -v /dev/ubuntu1. You'll probably see some unallocated Extents that could be allocated to the root logical volume or to another LV altogether. (ubuntu1 seems to be the volume group name, and in your display root is the logical volume residing within that volume group).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.