[Resolved] Erroneous 100% disk usage Ubuntu guest on Win2016 server

Discussions about using Linux guests in VirtualBox.
Post Reply
lifeboy
Posts: 5
Joined: 1. Jun 2018, 08:16

[Resolved] Erroneous 100% disk usage Ubuntu guest on Win2016 server

Post by lifeboy »

I have Ubuntu 16.04 installed as guest on a Windows 2016 host and despite only using about 9GB of a 20GB volume, Ubuntu reports that the disk is 100% full. Previously I had the disk at 15GB and it also reported full, so I made a copy and increased the size to 20GB. The machines started fine from that copy and I didn't give a it much attention. The machines is basically a Unify controller and UNMS host. A day later I again couldn't access UNMS and lo and behold, the disk is reported full again. However, disk usage is still only 9GB, so what's going on here and how can I fix this.

Virtualbox is the latest version and guest additions are installed.

thanks
Last edited by socratis on 7. Jun 2018, 16:24, edited 1 time in total.
Reason: Marked as [Resolved].
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Erroneous 100% disk usage Ubuntu guest on Win2016 server

Post by socratis »

First of all., moving to "Linux Guests" from "Windows Hosts".
lifeboy wrote:despite only using about 9GB of a 20GB volume
How do you know? Based on what?

You got to remember that Linux uses several partitions, so, check from within your guest where the space is consumed. If you have a default 16.04 installation, you should have the "Disk Usage Analyzer". Use it to find out the details...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
lifeboy
Posts: 5
Joined: 1. Jun 2018, 08:16

Re: Erroneous 100% disk usage Ubuntu guest on Win2016 server

Post by lifeboy »

socratis wrote:First of all., moving to "Linux Guests" from "Windows Hosts".
What's this about? Your comment doesn't make sense to me...
lifeboy wrote:despite only using about 9GB of a 20GB volume
How do you know? Based on what?

You got to remember that Linux uses several partitions, so, check from within your guest where the space is consumed. If you have a default 16.04 installation, you should have the "Disk Usage Analyzer". Use it to find out the details...
Indeed, "Disk Usage Analyzer" reports this. Also, after increasing the disk size with 5GB, nothing much changed (ie not new software installed, updates done, or others) and the diskspace just "vanished".

The original disk was set to grow as needed, so the copy which I increased in space, I made fixed size (ie 20GB allocated).
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: Erroneous 100% disk usage Ubuntu guest on Win2016 server

Post by andyp73 »

lifeboy wrote:after increasing the disk size with 5GB, nothing much changed
Did you just increase the size of the disk image within the VirtualBox media manager or did you also resize the partitions within the Linux guest so that it also knows about the extra space?

Can you post the output of the following command within the guest:
df -h
fdisk -l
-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
lifeboy
Posts: 5
Joined: 1. Jun 2018, 08:16

Re: Erroneous 100% disk usage Ubuntu guest on Win2016 server

Post by lifeboy »

roland@ubuntu-vbox:/usr/bin$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.5G     0  1.5G   0% /dev
tmpfs           312M   33M  280M  11% /run
/dev/sda1        17G   17G     0 100% /
tmpfs           1.6G  192K  1.6G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.6G     0  1.6G   0% /sys/fs/cgroup
Host-Downloads  425G  167G  258G  40% /media/sf_Host-Downloads
tmpfs           312M   28K  312M   1% /run/user/1000

roland@ubuntu-vbox:/usr/bin$ sudo fdisk -l
[sudo] password for roland: 
Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x52cf8aaa

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048 35405823 35403776 16.9G 83 Linux
/dev/sda2       35407870 41940991  6533122  3.1G  5 Extended
/dev/sda5       35407872 41940991  6533120  3.1G 82 Linux swap / Solaris
So there's the picture quite clearly...
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: Erroneous 100% disk usage Ubuntu guest on Win2016 server

Post by andyp73 »

I think you need to see why Linux thinks it is full for which you are going to have to do some investigation. Start by running this command:
du -h --max-depth=1 /
If there is one directory that stands out as consuming most of the 17GB then add the name to the end of the command e.g. if that directory is /opt then the command would become:
du -h --max-depth=1 /opt
It may be that there is something genuinely expanding to fill the available space. We need to rule that out before we delve into what VirtualBox may have done.

-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Erroneous 100% disk usage Ubuntu guest on Win2016 server

Post by socratis »

lifeboy wrote:
socratis wrote:First of all., moving to "Linux Guests" from "Windows Hosts".
What's this about? Your comment doesn't make sense to me...
It means that your problem/question has to do with your "Linux Guest", not with your "Windows Host", so I moved it to the appropriate forum section. Nothing to worry about, but it may help you next time that you're searching for a problem if you're looking in the appropriate section.
andyp73 wrote:I think you need to see why Linux thinks it is full for which you are going to have to do some investigation.
I already suggested, and 'lifeboy' confirmed that he has "Disk Analyzer" installed in the guest. That's much easier compared to the "du -h --max-depth=1 /", no? ;)
andyp73 wrote:before we delve into what VirtualBox may have done.
What could have VirtualBox done to a guest? I don't think too much...

'lifeboy', just because an OS/program that runs in the context of VirtualBox has a problem, it doesn't make it a VirtualBox problem necessarily. You're having an issue that has most probably nothing to do with VirtualBox, so my suggestion would be to treat it as such, as a native problem with the OS or the application of the guest.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
lifeboy
Posts: 5
Joined: 1. Jun 2018, 08:16

Re: Erroneous 100% disk usage Ubuntu guest on Win2016 server

Post by lifeboy »

socratis wrote:so I moved it to the appropriate forum section
Ah, makes sense, although I didn't have this problem with the exact same installation on Windows Server 2008.
socratis wrote:
andyp73 wrote:I think you need to see why Linux thinks it is full for which you are going to have to do some investigation.
I already suggested, and 'lifeboy' confirmed that he has "Disk Analyzer" installed in the guest. That's much easier compared to the "du -h --max-depth=1 /", no? ;)
I have indeed used 'du' and 'Disk Analyser' ...
socratis wrote:'lifeboy', just because an OS/program that runs in the context of VirtualBox has a problem, it doesn't make it a VirtualBox problem necessarily. You're having an issue that has most probably nothing to do with VirtualBox, so my suggestion would be to treat it as such, as a native problem with the OS or the application of the guest.
The installation is stock standard Ubuntu 16.04, with Ubiquiti UNMS (in a docker container) and Unify controller installed. It doesn't take more than 9GB of space, exactly as is being reported by the OS. Disk Analyzer confirms this. However, since this is a dynamic disk image and it grows with the required space, I suspect something in Windows Server 2016 is causing the disk to not grow, or rather, report it's size incorrectly as full and not able to grow any more.

However, I increased the size again to 30GB (using gparted in the final step from a live boot CD) and it seems to be stable now, ie it's not reporting the whole drive is full any more. I'm monitoring the status and will report if things go south again.
Last edited by socratis on 7. Jun 2018, 14:10, edited 1 time in total.
Reason: Fixed formatting.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Erroneous 100% disk usage Ubuntu guest on Win2016 server

Post by socratis »

lifeboy wrote: since this is a dynamic disk image and it grows with the required space
No, it doesn't, you got it wrong. Dynamic won't increase according to your needs, it will increase its physical size on the host, up to the maximum, originally declared size.
lifeboy wrote:I increased the size again to 30GB (using gparted in the final step from a live boot CD) and it seems to be stable now
Again, it's not about stability, it's about capability, and if you've declared your original VDI to be small, that was pretty much the only course of action you could have taken.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
lifeboy
Posts: 5
Joined: 1. Jun 2018, 08:16

[solved] Re: Erroneous 100% disk usage Ubuntu guest on Win2016 server

Post by lifeboy »

socratis wrote:Dynamic won't increase according to your needs, it will increase its physical size on the host, up to the maximum, originally declared size.
... which is what I meant to say, but didn't explicitly do :-)
socratis wrote:Again, it's not about stability, it's about capability, and if you've declared your original VDI to be small, that was pretty much the only course of action you could have taken.
Here's the disk analysis now:

Code: Select all

$ sudo du -xh -t 1G --max-depth=5 /
1.9G	/var/lib/docker/containers/2fc17adb961683bb418a23984b2432748a15ec4e14d04979b761e6a786d81f4e
1.9G	/var/lib/docker/containers
2.7G	/var/lib/docker
3.1G	/var/lib/unifi/db/journal
3.3G	/var/lib/unifi/db
3.3G	/var/lib/unifi
3.1G	/var/lib/mongodb/journal
3.1G	/var/lib/mongodb
9.2G	/var/lib
10G	/var
1.2G	/home
1.2G	/lib
1.1G	/usr/share
2.1G	/usr/lib
4.1G	/usr
17G	/
So, the culprits are the database logs and you're quite right about this having nothing to do with the host OS.

Case closed :-) Thank you!
Last edited by socratis on 7. Jun 2018, 16:23, edited 1 time in total.
Reason: Fixed formatting.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Erroneous 100% disk usage Ubuntu guest on Win2016 server

Post by socratis »

Glad you got it going. Marking as [Resolved].
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply