LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Deleting VM and HDD space is still occupied (https://www.linuxquestions.org/questions/linux-software-2/deleting-vm-and-hdd-space-is-still-occupied-4175468108/)

litzel 07-02-2013 01:48 AM

Deleting VM and HDD space is still occupied
 
Greetings everyone,

I had a VM in virtualbox that had Win XP inside my Linux Desktop machine. When my work was done with that VM, I deleted it, but the HDD space that was occupying was still occupied. I had chosen the option to also delete the vdi and it did, but still free space didn't go up.

Any thoughts?

My distro in that desktop is Xubuntu 12.04 on that machine, speccs are Pentium 4@2.4GHz, 1GB RAM, 60GB HDD.
Thanks in advance!

evo2 07-02-2013 02:00 AM

Hi,

did you check the files were really deleted? Eg
Code:

ls -lhR ~/.VirtualBox
What method did you use to determine that
Quote:

the HDD space that was occupying was still occupied
?

How much space did you expect to become free when you deleted?

Evo2.

litzel 07-02-2013 02:07 AM

Hi and thanks for swift reply!!

Yes, I checked, the .vdi and the other files it had created were gone. I also ran a locate and a ls -al command to be sure.

As I mentioned the total disk capacity is only 60GB, with the OS and my files taking 15GB and the VM taking another 15GB, so when I was running the VM I had 45GB of disk space and 30GB unoccupied, when I deleted the VM it was still 30GB unoccupied. Numbers are pretty "round" so it's easy to remember the exact amounts;)

evo2 07-02-2013 02:22 AM

Hi,

Quote:

Originally Posted by litzel (Post 4982270)
Yes, I checked, the .vdi and the other files it had created were gone. I also ran a locate and a ls -al command to be sure.

Ok.

Quote:

As I mentioned the total disk capacity is only 60GB, with the OS and my files taking 15GB and the VM taking another 15GB, so when I was running the VM I had 45GB of disk space and 30GB unoccupied, when I deleted the VM it was still 30GB unoccupied. Numbers are pretty "round" so it's easy to remember the exact amounts;)
How do you know that the VM was really taking 15GB? Even if you gave the VM a 15GB virtual drive the image file would not necessarily use all of that. In virtualbox the vdi files expand as needed. I would imagine a simple XP install would only take around 1 or 2 GB (but I'm no XP expert).

Evo2.

litzel 07-02-2013 02:26 AM

Hi again,

I know of the actual size cause I set it so on the slider while setting up the installer of the VM. I didn't enable the dynamic size allocation but fixed it to 15GB. The vdi was given to me by my teacher in college and it was set to be 10GB so I added 5 more on my own to be sure I will work with ease.

evo2 07-02-2013 02:41 AM

Hi,
Quote:

Originally Posted by litzel (Post 4982287)
I know of the actual size cause I set it so on the slider while setting up the installer of the VM. I didn't enable the dynamic size allocation but fixed it to 15GB. The vdi was given to me by my teacher in college and it was set to be 10GB so I added 5 more on my own to be sure I will work with ease.

Ok, in that case I would guess that the file is being held open by some processes (even though it is deleted). This type of thing often happens when people delete large log files in an attempt to free up some disk space and then find that the output of df is unchanged. Have you rebooted since deleting the VM?

Evo2.

litzel 07-02-2013 04:12 AM

Hi,

Yeah, I've rebooted a lot of times since then... still shows as space that is being used.

jefro 07-02-2013 02:44 PM

Check the filesystem in single user mode maybe.

I thought the file was being held open until a reboot also.

Any chance it is in the trashcan? Is this a btrfs filesystem?

litzel 07-03-2013 01:17 AM

Hi again,

Not in the trash can, it's clear...

I'm not exactly sure what a btrfs file system is, but the HDD is formated as ext4 if this is any close to an answer.

jefro 07-03-2013 07:50 PM

Boot to a live cd and run fsck or other filesystem utility.
Normally you don't want to check a mounted drive. You might be able to do this in single user mode.


http://www.commandlinefu.com/command...-progress-info

litzel 07-04-2013 02:11 AM

Thanks for all your suggestions guys, but I kind of solved it my own way... since it is a desktop of minor importance and one I rarely use, I just formatted it and everything is back to normal.

I'm really curious to try jefro's suggestion though... will keep it in mind and in case it happens again in the future will try it out!


All times are GMT -5. The time now is 02:47 PM.