HASSIO .vdi file takes too much space

Hello,

I have a HASSIO OS in vbox. It have been running for 1.5 years w/o problems. Yesterday I figured out, the storage what the *.vdi file takes is 50 GB (!). I could not get information what takes up so much space…

What have I done to investigate the problem and it did not helped:

  • I connected through SSH and installed the Midnight Commander (mc) to check all dirs in root, but nothing.
  • I checked the logs but they seemed OK too. (In ssh)
  • I runned this: vboxmanage modifyhd haos_ova-9.5.vdi --compact
  • Cleared the logs from the UI
  • My all backups are stored on a Nextcloud server, so they are not relevant. (And actually they have 50 MB size by each.)

Do you have any idea what I missed? Thank you in advance.

How did you allocate the disk? If you chose dynamic allocated (thin provision) the disk will increase its size when you need, if you chose fixed size it will be 50GB from day 1. https://www.howtogeek.com/312883/how-to-shrink-a-virtualbox-virtual-machine-and-free-up-disk-space/

It is a good question. I do not remember. I think it is dynamically allocated, but I did not use any UI to create this. I have a debian server w/ ssh connection only.

On HASSIO web, I see this:
Screenshot from 2023-11-05 10-00-56

I got the info w/ this: $ VBoxManage showmediuminfo <uuid>

UUID:           <uuid>
Parent UUID:    base
State:          locked write
Type:           normal (base)
Location:       /home/system7/VirtualBox VMs/hass/haos_ova-9.5.vdi
Storage format: VDI
Format variant: dynamic default
Capacity:       102400 MBytes
Size on disk:   52277 MBytes
Encryption:     disabled
Property:       AllocationBlockSize=1048576
In use by VMs:  hass (UUID: <uuid>)

Unless you are very short on storage I wouldn’t think too much of this.

The biggest problem, we do not know exactly, what has got this much space. Currently, I have 1 TB for system drive home partition, so yeah, it is not a problem. (Actually the whole debian server does not take 50 GB w/o the HASSIO.)

So, if it will takes 150 GB next year w/o knowing what causes it, that is the problem. :slight_smile:

Assuming you mean the SSH addon, only what is under /config matters. What is the size of that folder?

What addons are you using? Not using HAOS (I assume you do, here), so I don’t actually know how to check the space used by addons…

Not a chance. The max size of the disk is 100GB :wink:

It will never be able to grow past what you provisioned. A 100GB virtual disk cannot grow to 150GB.

Yes, but no. I installed it, but I connect through my terminal from my desktop. My addons list:

  1. Advanced SSH & Web Terminal
  2. Mosquitto broker
  3. Nextcloud Backup
  4. Studio Code Server

OK, guys. I think I was not precise enough… Just for clarification: I DO NOT care how much space I have left. The only thing what is matter that, why the system consuming that much storage. I do not want to thinking this problem, when my all space is filled w/ something and the system freezes. I know exactly how much space I have and how much space the virtual drive has in total.

So pls, I would like to know that, what thing is consuming this storage. :slight_smile:

But all your space is not filled - You have shown a screenshot from HA that shows you are only using 16%. You also stated that you have 1TB partition where this virtual disk resides, so why are you assuming you are running out of storage? How much free space do you have on the Debian installation?

Sorry, but where I assumed I am running out of storage?

Enough.

But, I do not know why I answer, because I did not got any added idea for my question. :smiley:

LOOP;

You said “I do not want to thinking this problem, when my all space is filled w/ something and the system freezes”, hence my comment about running out of storage.

You might be overthinking this, a .vdi using 50GB is not much, at least not when HA inside the .vdi reports 16% used. For comparison mine is 90GB and using 54%.

In this sentence, the keyword is that ^ So, I like to prevent the problems, and I like to know what happens on my machine.

Interesting attitude that… “Oh who cares the that, the system is only 50 GB, you have 1.5 TB more.” Meanwhile the system should consume around 10-16 GB.

You can drop the attitude, I’m just trying to help you and figure out what you are after. It’s becoming clear that you’re trying to prevent a problem that won’t ever materialize.
You’re at 16% used storage, you have no reason to be worried about this. If you ever hit 80-90% (not likely unless you don’t rotate your backups or do something wrong) just expand the .vdi.

1 Like

OK. I resized the disk size to 55 GB maximum. Because all my ssds have a failure and I do not have more space on Debian too.

OMG! I have a problem. The system says I run out of space because 91% of space is used. :dizzy_face:

Please, help me! How can I free up space? What consumes so much space in HASSIO?? :smiley:

You seem to not catch the point - HA is not consuming more than 16%. Your question belongs in a Virtualbox forum. Hint: A hypervisor does not reclaim blocks when they are deleted in a virtual disk, it can only consume. Not sure how Virtualbox does paging, you can look into that too.

If you give a virtual machine a brand new, empty 50GB dynamic / thin provisioned drive, then copy a 50GB file to that drive and immediately delete said file your hypervisor will still say that you have consumed 50GB on that drive even if it is empty.

This is the reason why I mentioned this command in the topic starter. If the Virtual Machine consumes the drive somehow too much space and I free up inside the machine, after that I can control it by this command from the host.

This vm is the only (in my all vms) where this command did not work. The reason can be that, the HA still consumes that space inside the VM, but I do not know where.