ZRAM and persistence


I see problem with persistence when I switch OH to ZRAM. I saw that other had similar issues but it was mentioned about ZRAM. Below you can se data from console and from zramctl.
I’m not a expert but space seems be ok. I have problem with all all historical data

15:51:22.585 [ERROR] [rd4j.internal.RRD4jPersistenceService] - Could not create rrd4j database file ‘/var/lib/openhab/persistence/rrd4j/Systeminfo_CPUTemperature.rrd’: /var/lib/openhab/persistence/rrd4j/Systeminfo_CPUTemperature.rrd (Read-only file system)

[15:48:48] openhabian@openhab:/etc/openhab/persistence$ zramctl
/dev/zram0 lzo-rle 600M 4K 87B 4K 4 [SWAP]
/dev/zram4 zstd 600M 76.4M 9.2M 27.6M 4
/dev/zram3 zstd 900M 601.2M 8M 300M 4 /opt/zram/zram3
/dev/zram2 zstd 600M 76.1M 8.9M 33.6M 4
/dev/zram1 zstd 900M 601.8M 8.7M 300M 4 /opt/zram/zram1

You have a weird long list of zram filesystems. Did you reboot recently ? If not please do. Eventually stop openhab and zram-config.service first and remove unneeded files.
You also seem to have (too) large defaults for your rrd4j files (600M is a LOT).

After reboot:

[18:56:47] openhabian@openhab:~$ sudo zramctl [sudo] password for openhabian:
/dev/zram2 zstd 600M 179.8M 28.8M 77.7M 4 /opt/zram/zram2
/dev/zram1 zstd 900M 601.1M 8M 300M 4 /opt/zram/zram1
/dev/zram0 lzo-rle 600M 4K 87B 4K 4 [SWAP]

And the same problem with persistance

@ndye wasn’t there something with some wrongly displayed size ?

Sort of, if I had to guess based of the information given you are using an older version of ram. @Xfiles80 have you tried uninstalling zram rebooting and then reinstalling it? It looks like you are observing a bug from older versions of zram that would cause a similar problem.

  1. Uninstalled
  2. Rebooted
  3. Installed

[00:15:57] openhabian@openhab:~$ zramctl
/dev/zram2 zstd 600M 179.6M 26.7M 78.5M 4 /opt/zram/zram2
/dev/zram1 zstd 900M 601M 7.8M 300M 4 /opt/zram/zram1
/dev/zram0 lzo-rle 600M 4K 87B 4K 4 [SWAP]

and the same persistent error

00:22:03.001 [ERROR] [rd4j.internal.RRD4jPersistenceService] - Could not create rrd4j database file ‘/var/lib/openhab/persistence/rrd4j/Systeminfo_CPUTemperatur e.rrd’: /var/lib/openhab/persistence/rrd4j/Systeminfo_CPUTemperature.rrd (Read-o nly file system)

I upgraded system to OH3 (probably in January) so I didn’t install system from the scratch

Not sure what is going on, but I tested on a fresh install and I did not observe the bug. I also don’t observe any issues on my production system.

What should be correct output?

What branch and version of openHABian do you use ?

3.0.2 Relase Build

and additional problem - no space on card

[14:47:14] openhabian@openhab:~$ sudo du -xh / | grep -P “G\t”
1.6G /var/lib/openhab2/backups
1.6G /var/lib/openhab2
1.9G /var/lib/openhab/backups
3.0G /var/lib/openhab
4.8G /var/lib
5.5G /var
5.7G /mnt/ssd1
5.7G /mnt
1.6G /srv/openhab2-userdata/backups
1.6G /srv/openhab2-userdata
1.9G /srv
1.9G /usr
17G /
[14:51:46] openhabian@openhab:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 15G 15G 0 100% /
devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 349M 3.6G 9% /run
tmpfs 5.0M 8.0K 5.0M 1% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/mmcblk0p1 253M 48M 205M 19% /boot 220G 200G 20G 92% /mnt/ext-storage
tmpfs 793M 0 793M 0% /run/user/1000

I didn’t mention that I switched off ZRAM

I belive that reason of no space is dd. I tried to do image of disk and there was problem with target disk. After this I dont have space and cant extend system to full card capacity(64GB)

That I didn’t ask.

So bottom line is you caused it yourself and it was a false alarm?

Btw there’s an openhabian menu option to mirror the disk.

I think that problem was related to ssd card. After exchange everything is ok.