What's using my storage?

Searched but cannot find an answer (maybe I searched wrong).

What is using up my storage? Causing my backups (snapshot) being over 3 hours. Where can I see what is in the 40% of my storage?

In other words, what is making up my 40% storage? What addon is using how much?

Try some other tool to dive into the detail: e.g. du -shx * | sort -rh | head -10
Needs to run from root with root(sudo)

Thanks.

I am running ubuntu 2020ā€¦shx works fine with me but whatever the sort, you can export it to a file and analyse further in eg. excel/spreadsheetā€¦ There are more tools besides ā€˜duā€™, you can also run them to dig into folder, eg. ncduā€¦ good luck

I run homeassistant OSā€¦

Any other tips?

haos is linux based so I would assume that additional tools should be installable ā€¦ but sadly I cannot be 100% sure as not known to the haos detailsā€¦you can just start with ā€˜duā€™ and then pipe it to a file that you can readinto excelā€¦ā€˜duā€™ pumps out a LOT of data though hence the ā€˜sortā€™ and ā€˜headā€™ in my proposed approach. Soā€¦try for instance du --max-depth 2 and dig deeper from thereā€¦not that links/mounts can be double counted

Appreciate all the ā€œlinux commandā€ answers. Is there another option to see what the addon size and / or storage usage is?

As I donot run hassio I would not know but I still guess you require some unix commandsā€¦ Even on Windows or MacOS I need to install additional tools to get into a readable version of the details. Sorry that I cannot help more

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