Openhabian /var/log always filling up

I’m running openhabian - Release = Raspbian GNU/Linux 12 (bookworm)

I’ve been having issues with my /var/log filling up all the time since I upgraded from an older openhabian release.

openhabian@opi:~ $ df -h | grep log
overlay2        452M  408M  9.1M  98% /var/log

I just deleted several filed to get it down to 98% full, but this is what it shows.

as per the the default setup, I have it mounted in /etc/ztab:

# log   alg             mem_limit       disk_size       target_dir              bind_dir                oldlog_dir
log     zstd            200M            500M            /var/log                /log.bind

The strange thing to me here is that this is showing 408MB used (of 452). It seems strange as when I went through deleting anything in the MB range, I ended up with only files in the kB range left and it didn’t feel right that those kB files could add up to 400+MB.

So I check the dir usage with du, I get only 19M:

openhabian@opi:~ $ sudo du -sbh /var/log
19M	/var/log

Where are these other 389MB being used?

If it’s a stock openHABian the log folder is in zram. Zram uses compression which I think can interfere with du. At heart I’ve seen some weirdness in the past.

what I would try is now you’ve deleted the files is to reboot. That should flush the changes it to disk and when the machine comes back up it won’t have anything to lead and maybe show a reasonable usage.

If not, will probably have to wait for an expert to chime in.

It does not happen on stock openHABian but it’s impossible to tell what’s different on your system (BTW bookworm is a Linux release - that does not say much about the openHABian version you are running).
openHABian v1.9.2 was just released and has important changes as to zram, too.

Please get it to reinstall your box, then import your old config.

1 Like