What's using my storage?

There is another thread with the same topic … Something is filling my hard drive - Home Assistant OS - Home Assistant Community (home-assistant.io)

Thanks, have read that already. My problem is not it’s increasing. I just want to know what takes what storage…

1 Like

Have you found a solution for this?
my full backup is much smaller than the space it currently uses.

I also just want to know what takes this storage…

No I did not.

And lately I have more questions remaining unanswered compared to a few years back.

Hey @sender
I’ve done some research and got assistance from @Impact on Discord.

To proceed, enter login in the VM console, and then execute the following commands:

  1. du -shc /* | sort -h
  2. du -shc /mnt/data/* | sort -h

These commands will provide insights as displayed in the image below:

Additionally, @Impact suggests using docker system df. The command ha supervisor repair is also useful for cleaning up old images.

I hope that this will also help you a little further.

1 Like

Has anybody an answer to this:

df -h

gives:
2024-01-10_12-09-34

So it seems 20.96 GB used

But

du -shc /* | sort -h

gives
2024-01-10_12-11-15

So only 6.06 GB used

Is there any way to find out / clear the overhead (14GB) in diskspace?

kind regards,
Bartplessers

Space is probably used by docker overlay. Should be in /var/lib/overalay dir.

nope
2024-01-10_12-25-13

I have the exact same thing (except it’s 12 GB and 278 MB).

Running HAOS as well. On a Raspberry Pi 3B+.

…and I have no idea what I’m doing.

tl;dr - Running du -shc /* | sort -h from the SSH add-on will show most everything except add-ons. To see add-on sizes, run docker ps --size from console or SSH access into HAOS (not the add-on).

Running this from the SSH add-on will only show you the storage seen by the HA container (I’m probably wording some of this technically incorrectly).

Runnng the same command from console access (or SSH access into HAOS) gives you the full results:
image

Then you can start iterating through folders:

If you want to see add-on sized, you can use the docker ps --size command:

The formatting can get jacked here depending on your monitor resolution. The screenshot was from a 49" widescreen in 5120x1440. On a normal 1920x1080 monitor, the rows were wonky. Easily fixed by copy/pasting into a spreadsheet editor.

For the size reported by docker, the size outside parentheses is the ‘write’ space and the ‘virtual’ is the read space. I literally just Googled this so it makes sense in my head but I’ll let someone else better than me explain it:

Thank you for taking the time to dumb things down for me!

I thought that meant configuring the terminal add-on to accept an SSH connection but I was wrong:

So you meant SSH into the OS. I found this documentation, I’ll try it tomorrow when I find a USB stick: Debugging the Home Assistant Operating System | Home Assistant Developer Docs

But I’m surprised the add-ons would be responsible as I don’t have many: HACS, Google Fit, ESPSomfy RTS (these two from HACS), ESPHome, File editor, Terminal & SSH.
It shouldn’t be the backups since I deleted all bar the terminal 9.8.1 (which came in handy today as the 9.9 would simply not start). It shouldn’t be the recorder since I deleted almost everything (and it’s a 2 month old install with fairly few sensors and events).

Oh…I was dumbing this down for me :laughing:. I had a similar question in my head like a week ago about how much space an add-on was taking up but that penguin fell off the iceberg. Your post popped this back up which reminded me so I did some sleuthing.

You can actually setup the HAOS SSH without a USB key.

So, what I did was use PowerShell to generate a key:

I then opened “id_rsa.pub” in Notepad, copied everything, and pasted it into the SSH add-on “Authorized Keys” from the “Configuration” tab.

From there, just follow the instructions in the post I linked.

2 Likes

I’m not using Proxmox, though, but HAOS directly on the Raspberry Pi 3B+

Ah, yeah, I suppose a thumb drive could be easier than hooking up a keyboard/monitor.

I can’t make it work, though

You could try this:

We got @Nickduino squared away in the new thread.

I’m not sure this explains why my storage is full:

I can’t run du -shc / | sort -h*, though. Well, I can but it’s been 5 minutes and the Pi didn’t return anything:

image

Sounds nice, definitely beats having to use a USB drive, convert file to Linux EOL, etc!

But giving it a few more minutes (man, the 3B+ really isn’t the right hardware for Home Assistant. What’s weird is that the CPU load is only 30% and memory 50%) worked. So I have 14.9 GB in /mnt.

Sending du -shc /mnt/ | sort -h*, I’ll have the values in 10 minutes…

It’s likely the command runs single threaded.