Question about disk size

This is for discussing general topics about how to use VirtualBox.
Post Reply
N00bie
Posts: 13
Joined: 8. Jul 2014, 17:00

Question about disk size

Post by N00bie »

When creating my VM I added a 20GB hard drive using this command:

Code: Select all

vboxmanage createhd --filename "/Users/nate/VirtualBox VMs/testvm/testvm-disk01.vdi" --size 20480
In Settings->Storage->testvm-disk01.vdi it says:

Code: Select all

Virtual Size: 20.00GB
Actual Size 11.35GB
sudo df -h shows:

Code: Select all

Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root   12G   11G  274M  98% /
none                         4.0K     0  4.0K   0% /sys/fs/cgroup
udev                         3.9G  4.0K  3.9G   1% /dev
tmpfs                        799M  420K  799M   1% /run
none                         5.0M     0  5.0M   0% /run/lock
none                         3.9G     0  3.9G   0% /run/shm
none                         100M     0  100M   0% /run/user
/dev/sda1                    236M   69M  155M  31% /boot
I'm unable to start MySQL, and I think it's because it thinks it's out of disk space. I'm a Linux newbie and am a little confused by this. Why are there so many partitions? I thought setting the disk size to 20GB would be plenty big, but it looks like the main partition is only 12GB for some reason?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Question about disk size

Post by Perryg »

The "/dev/mapper/ubuntu--vg-root" indicates that you formatted the guests partition in LVM and that creates more partitions than a standard format.

This has nothing to do with VirtualBox and as such is outside the scope of this forum. I can say that what you are seeing is accurate as indicated in the df.
You can increase the drive size or you can change the partition allocation. This you need to ask Ubuntu how to do.
Post Reply