I can of course just resize it, but I can’t seem to find what is taking up all that storage. The largest file or directory I have been able to locate is a backup of 1.22 GB, second largest is the www directory that is 174 MB.
Any idea where I should look? Or is this a sensible size (going to 50 GB) with no obvious culprits sticking out?
EDIT: I can’t see any add-on sizes via Samba shares, is there some way to see this from the UI?
use the cli and the command “ls -la” to view directories.
The l (L not a capital i) will make the output in long format where you can see size and more.
The a will let you see hidden directories, which in Linux is the ones starting with .
So again, nothing really sticks out, but I’m not sure if I’m seeing everything (well, since the 40GB is almost used up, I’m obviously not. But I don’t know where else to look).
Disabling safe mode on the “Advanced SSH & Web Terminal” and running docker system df shows:
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 47 27 16.65GB 8.849GB (53%)
Containers 27 24 38.72MB 136.2kB (0%)
Local Volumes 0 0 0B 0B
Build Cache 0 0 0B 0B
Doing docker image prune reclaimed a few GB (didn’t want to to docker system prune or docker image prune -a, just to be sure).
But that still only accounts for less than half of the used storage in the VM (17 GB in docker, 2.8 GB for root system and everything accessible via ssh)
The accepted answer in your link states (and show) that du does parse hidden directories (but not when using wildcard *. So if I understand it correctly, hidden would be included in the summary when du -sh /), but not listed with du -sh /*).
I also tried du -h /config just to be sure, and it does list the .storage, .idea, etc. directories.
Just for kicks, I also tried du -hs /config/.[^.]* to specifically list the hidden directories (did the same for /media/, /backups/, /addons/, etc.), and this does not seem to be what’s taking space:
That means you do not have anything big stored somewhere, like backups.
If the size you see is in the hypervisor, then it is probably the inflated disk you see.
The disk will inflate when it uses the space for different stuff, like backups, and it will not go down again unless you shrink it manually or schedule the hypervisor to do it.
The problem here is that the hypervisor needs guestOS utilities installed, so it can move the files on the virtual file system to the beginning of the virtual disk but these guestOS utilities might not be available some of the HA installation forms, like HAOS.
The VM has 40 GB allocated, and that i of course the size of the *.qcow2 image (is that what you mean by size in hypervisor?).
The “problem” with the disk being almost full is that Home Assistant is complaining about this in the HA UI (after running docker image prune I now see 6.4 GB free in the UI*, but before that it shows 90+ % used and 0.9 GB free and had warnings in my HA notifications).
*I am using the Nextcloud backup addon, and I don’t keep a lot of backups locally. The 6.4 GB free is after upgrading a few things, so some of the large auto-backup files have been automatically cleaned locally, freeing up a but more.
Yes the qcow2 size is the size that the hypervisor have allocated to the guestOS.
This file is typically set up to be growable In the hypervisor, unless you specifically set it to a fixed size.
A growable file will expand when you do things like backup within HA, which will most likely be done locally and then copied to your remote location afterwards.
Once the qcow2 file have grown it can be hard to shrink it again without guestOS utilities to prepare the disk allocation within the VM.
Sure, I’m OK with a 40 GB qcow2 image, I just don’t get why HA seems to see the (40 GB) disk as almost full. I could increase this, I don’t want to do this unless I need to.
I can see that deleting dangling docker images or old backups reduces this disk usage (in HA), but I can only find folders/files to account for less than 20 GB (incl. backups), so I’m trying to figure out if there’s some large chunk of junk somewhere I should do something about.
In short, what am I not seeing when listing all (incl. hidden) files and folders after SSH to the VM using Advanced SSH & Web Terminal (or just going over them in Finder using the Samba share add-on) and also listing all docker images (which don’t seem to be shown with ls, du, or anywhere in the Samba shares)?