Page 1 of 1

VirtualBox crowded my harddisk

Posted: 15. Jul 2010, 18:27
by ekeis98
Hi,

my prob is a really weird one. I'm using a Windows XP guest on a VBox-v3.2.6 host on Ubuntu 10.04.

I've made a little mistake during updating the system. I've updated today Ubuntu (restart required, but I didn't). I've updated VBox from 3.2.4 to 3.2.6. And of course after everything was running fine in the past I forgot to reboot today.

Then the strange thing started. The VBox was booting Windows to the welcome screen, I've logged in and waited patiently. Nothing happened, but the harddisk grew up about 1 Gig a minute. Starting the guest without rebooting VBox was using the CPU by 100%. After about 45 minutes I killed the VBox process.

I've explored the harddisk and found out that none of the VDI files were bigger than before. Then I cross checked the directories and found out the the capacity of the drive is far far away from the sum of available space plus used space. So VirtualBox must have written into nowhere and this nowhere reduces my free space.

I cannot find the files that crowd my harddisk, so i cannot delete them. I cannot fsck the drive because it's a RAID10 system. I've listed files by size bigger the 10MB, 1GB, 10GB, I've listed files by creation date of today. I found nothing.

So, is there any help out there, who can bring back my full capacity of the drive? Any links and docs appreciated.

Thanks for your patience and for your time working on my problem.

Oliver.

Re: VirtualBox crowded my harddisk

Posted: 15. Jul 2010, 18:47
by Perryg
What about the swap file?
Have you rebooted yet? Maybe it will clean up after that.

Another thing can be unused files. apt-get autoclean/autoremove should clean up a lot of space. See man pages for the proper use.

Re: VirtualBox crowded my harddisk

Posted: 16. Jul 2010, 09:19
by ekeis98
Perry, thx for reply.

I've rebooted the system, no change. I will try autoremove/autoclean.

I've never got in touch with the swap file directly:
Where can it be found?
Which command do I have to use to influence it?

Re: VirtualBox crowded my harddisk

Posted: 16. Jul 2010, 10:50
by mpack
The Windows XP swapfile is a hidden file called "pagefile.sys" in the root folder. The maximum size of this is set in My Computer | Properties | Advanced | Performance | Advanced tab | Virtual memory panel. However it's best to accept the default size, performance can be very bad if you get this size wrong.

I would note:
  1. If there was a lot of pagefile activity when the guest was "idle", then the guest was not idle. Check its task list for unnecessary background processes, such as the file indexer. Google the purpose of these and how to get rid of them. You can make a backup of your VDI first if you are not sure.
  2. The pagefile will grow to a max size (typically 3-4 times the size of the computers memory) and then stop. It will not "grow by 1GB a minute". E.g. if your guest has 512MB memory, the swap file will grow to 1.5GB - 2GB. If it keeps growing, and if your description is correct then after half an hour it should have grown to 32GB, then the issue is not the swap file.
  3. If the issue is not the swapfile then I would look to one of the aforesaid unwanted background processes continually writing to disk. Specifically I'd look for a background defragmenter process.

Re: VirtualBox crowded my harddisk

Posted: 16. Jul 2010, 11:13
by ekeis98
Hi mpack, thx for your time.

I don't think it's a matter of the Windows-XP guest. If it had been, then the VDI files (original one and the snapshot file) would have grown - but they didn't.

It must be a matter of the Linux host that must have written into the file system. My prob is that i can't find files that waste that space.

[SOLVED]: VirtualBox crowded my harddisk

Posted: 16. Jul 2010, 13:34
by ekeis98
Thx guys. Finally I found it out.

The VBox was starting, but not correctly, maybe because of the not done reboot. So the VBox.log file was crowded. It was about 116 Gigs untill I killed the VirtualBox process...

To whom it may concern:

Code: Select all

user@dbs01:tail -n 10000000 VBox.log
01:57:28.308 PATM: Disable block at f3235f7b - invalid write f3222ca2-f3222ca3
01:57:28.308 PATM: Disable block at f3235f7b - invalid write f3222ca2-f3222ca3
01:57:28.308 PATM: Disable block at f3235f7b - invalid write f3222ca2-f3222ca3
01:57:28.308 PATM: Disable block at f3235f7b - invalid write f3222ca2-f3222ca3
01:57:28.308 PATM: Disable block at f3235f7b - invalid write f3222ca2-f3222ca3
01:57:28.308 PATM: Disable block at f3235f7b - invalid write f3222ca2-f3222ca3
01:57:28.308 PATM: Disable block at f3235f7b - invalid write f3222ca2-f3222ca3
01:57:28.308 PATM: Disable block at f3235f7b - invalid write f3222ca2-f3222ca3
01:57:28.308 PATM: Disable block at f3235f7b - invalid write f3222ca2-f3222ca3
01:57:28.308 PATM: Disable block at f3235f7b - invalid write f3222ca2-f3222ca3 ^C
user@dbs01:~/.VirtualBox/Machines/Windows XP Pro/Logs$ ll
insgesamt 129275920
-rw------- 1 user user 116348390577 2010-07-15 11:29 VBox.log
-rw------- 1 user user  11717187345 2010-07-15 08:09 VBox.log.1
-rw------- 1 user user        58785 2010-07-14 16:03 VBox.log.2
-rw------- 1 user user   4183598444 2010-06-22 11:14 VBox.log.3
user@dbs01:~/.VirtualBox/Machines/Windows XP Pro/Logs$ df
Dateisystem           1K-Blöcke   Benutzt Verfügbar Ben% Eingehängt auf
/dev/md0             302793832 222447468  64965340  78% /
none                   2057320       236   2057084   1% /dev
none                   2061656       172   2061484   1% /dev/shm
none                   2061656       340   2061316   1% /var/run
none                   2061656         0   2061656   0% /var/lock
none                   2061656         0   2061656   0% /lib/init/rw
user@dbs01:~/.VirtualBox/Machines/Windows XP Pro/Logs$ rm VBox.log
user@dbs01:~/.VirtualBox/Machines/Windows XP Pro/Logs$ df
Dateisystem           1K-Blöcke   Benutzt Verfügbar Ben% Eingehängt auf
/dev/md0             302793832 108714916 178697892  38% /
none                   2057320       236   2057084   1% /dev
none                   2061656       172   2061484   1% /dev/shm
none                   2061656       340   2061316   1% /var/run
none                   2061656         0   2061656   0% /var/lock
none                   2061656         0   2061656   0% /lib/init/rw
user@dbs01:~/.VirtualBox/Machines/Windows XP Pro/Logs$
So, you and the du-command had been a great help.