Virtual Box Virtual Disk not expanding

9,502

Solution 1

You assigned most of the space on your virtual disk to your LVM /dev/mapper/VolGroup-lv_home volume. Now you're trying to import your database into a file that is (most likely) not located in your home directory.

So the space from your root volume is used. That volume is only 50G in size.

You need to resize your LVM volumes.

I would assume that you chose to have your home directories in a separate partition during the installation of Fedora.
Given that you only use 1% of the free space in that partition and given that you're running out of space on your root partition, that choice might not have been optimal.

You're going to want to use lvresize to shrink your home volume and grow your root volume. If you have no experience with that tool, there seem to be plenty of guides online. Like this one: LVM Resizing Guide.

Solution 2

I believe you may want to check the Hard Drive size allocated inside the Fedora VM. Depending on how fedora was set up, the maximum size partition that Fedora sees could be 50G (which is what it looks like from your df -h output). Even though its dynamic in the eyes of VirtualBox, Fedora is not seeing it as dynamic because the partition during the install was at a fixed value.

I found a similar forum post regarding this at the Virtual Box Forums See here

Quick note after rereading the output. Look at the allocation to your /dev/mapper/VolGroup-lv_home it has 144G allocated to it. So if you transfer it there is should transfer. The above partition issue is still there except if you were transferring it to somewhere other than /dev/mapper/VolGroup-lv_home you would run out of space.

Solution 3

Where are you trying to import it? The root file system (/dev/mapper/VolGroup-lv_root) is full. If you need more space on root you need to resize your partitions to move space from /dev/mapper/VolGroup-lv_home

Share:
9,502
Patrick
Author by

Patrick

PHP web developer for sharecare, maker of medical Q&A sites.

Updated on September 18, 2022

Comments

  • Patrick
    Patrick over 1 year

    I have an iMac Core i5 host computer, 1TB Hard drive, 8GB Memory.

    I have created a Virtual Box VM to run Fedora 14 64bit with a 200 GB Dynamically allocated hard drive. Virtual Box version 4.1.6 r74713

    I have tried twice to import a 40+ GB database sql file and I keep running out of hard drive space.

    Each time I've tried this my VM's hard drive stops expanding at ~50 GB.

    df -h output:

    /dev/mapper/VolGroup-lv_root
                           50G   47G   96M 100% /
    tmpfs                 981M  260K  981M   1% /dev/shm
    /dev/sda1             485M   30M  430M   7% /boot
    /dev/mapper/VolGroup-lv_home
                          144G  213M  136G   1% /home
    ds                    931G  169G  763G  19% /media/sf_ds
    ds                    931G  169G  763G  19% /var/www/site-example.org
    

    I have plenty of space on the host computer (800+ GB)

    Virtual Box reports the actual size of the disk is 46.88 GB Virtual Box Storage Info Any ideas on why Virtual Box stops expanding the disk and how to fix it?

    Update

    I've run GParted on the VM and it says all 200 GB are used even though df -h doesn't report that. GParted screenshot

  • Patrick
    Patrick about 12 years
    @uSlacker the /dev/mapper/VolGroup-lv_root is the root of the virtual disk, that is what is supposed to be dynamically increasing
  • uSlackr
    uSlackr about 12 years
    No, you assigned 50GB to the root and 150GB to /home. There is no room left on /root unless you have a second VBOX disk you didn't mention.
  • Patrick
    Patrick about 12 years
    thanks for the reference for lvresize. Since 99% of my data is in mysql I just moved the mysql folder into /home and symlinked it rather than deal with resizing the volume