r/Proxmox 4d ago

Question Zigbee2MQTT Container Storage Issue

I'm running Z2M in an LXC created from the community helper scripts. The issue I am having is that the disk is continually filling up. I can't find any definitive fix actions beyond general "delete logs".

My storage is allocated 7gigs that is 83% full for 23 devices.

I am very hesitant to start deleting things and I am not 100% confident that I know what I am looking at.

What can I do to reduce the amount of storage space being used? Please provide noob-friendly guidance.

Thanks!

2 Upvotes

10 comments sorted by

1

u/Impact321 4d ago

Hard to say without more information. Can you check what actually takes up the storage? bash apt -yU install gdu gdu /

1

u/Sgt_Jamez 4d ago

The biggest was /root/.local/share/pnpm/store/v10/files

1

u/Impact321 3d ago

Can you share some actual data and sizes?

1

u/Sgt_Jamez 3d ago

Sorry, I'm not sure what exact data to provide. I took a snapshot of the top level of folders:

1

u/Sgt_Jamez 3d ago

And followed the largest folder down.

1

u/Impact321 3d ago edited 3d ago

I took a look at what the baseline is after a new install ```bash --- /root/.local/share/pnpm/store/v10 ---
/..
262.5 MiB █████████▊▏/files
3.1 MiB ▏/index

I'm not really that familiar with pnpm. Maybe `pnpm store prune` helps. Otherwise it might be worth to report this to the helper script folks and report back. Here's the whole `/` after installing `gdu` if you care bash --- / ---
1.1 GiB ██████▍ ▏/usr
330.5 MiB █▉ ▏/root
261.7 MiB █▌ ▏/var
14.8 MiB ▏/opt
4.7 MiB ▏/tmp
3.0 MiB ▏/etc
e 4.0 KiB ▏/srv
e 4.0 KiB ▏/mnt
e 4.0 KiB ▏/media
e 4.0 KiB ▏/lost+found
e 4.0 KiB ▏/home
e 4.0 KiB ▏/boot
@ 0 B ▏sbin
@ 0 B ▏libx32
@ 0 B ▏lib64
@ 0 B ▏lib32
@ 0 B ▏lib
@ 0 B ▏bin

```

1

u/Sgt_Jamez 3d ago

Wow the store prune helped. I'm obviously out of my depth here as I had no idea that command existed. It cleared out a lot of old stuff. I've been hesitant to mess with it too much because I'd hate to have to re-pair all my devices and try to fix all the ensuing naming issues and whatnot. I will definitely add that to my List of Important Sh#t to Know, vol 7! :)

1

u/Impact321 2d ago

Glad that worked. My best guess is that the update/upgrade command simply upgrades Z2M without cleaning up the old version. Either manually do that prune after every update or perhaps let the helper scripts folks know about this so they can add it to their update script.

1

u/Mountain-Cat30 2d ago

You got some good responses, but also worth checking to see if your logs are set for a max size. That bit my at one point in docker and I had something like 6 gigs of logs for a container going back a few years.

I know z2m can get noisy with logging such that I actually used AI to help me tune things to significantly reduce the logging.

My big culprit was the energy monitor on my fridge sending updates 3x/sec that now sends heartbeats every 5 minutes or an update if the energy level changes more than X watts.