Sync ZRAM with OH upgrades

@mstormi so in essence, we should somehow perform checks in e.g. openhab-cli for zram-managed openHAB folders. Maybe even prevent openhab2 to be updated via apt altogether in combination with zram?

I don’t follow. What sort of check and when ? Preferrably answer over at Github.

Never mind - there’s no dependency in openhab-cli itself for the clean-cache operation.

The upgrade script should probably warn that zram is running and display the recommended guidelines in such case. Either the update should fail gracefully, or the zram management stuff should be orchestrated through the openHAB update script in the installation package.

See post 45 where I already suggested that, more or less.
@benjy wdyt? Could you add checking for ZRAM to run and if so output a pointer to this thread ?

On my RPi3B+ I get the following info from /srv/ mount points:

openhabian@openhab:~$ mount | grep -i srv
/dev/mmcblk0p2 on /srv/openhab2-userdata type ext4 (rw,noatime)
/dev/mmcblk0p2 on /srv/openhab2-logs type ext4 (rw,noatime)
/dev/mmcblk0p2 on /srv/openhab2-addons type ext4 (rw,noatime)
/dev/mmcblk0p2 on /srv/openhab2-conf type ext4 (rw,noatime)
/dev/mmcblk0p2 on /srv/openhab2-sys type ext4 (rw,noatime)
overlay1 on /srv/openhab2-userdata type overlay (rw,relatime,lowerdir=/opt/zram/openhab2.bind,upperdir=/opt/zram/zram1/upper,workdir=/opt/zram/zram1/workdir,redirect_dir=on)

In case this helps.

No that’s misleading. /srv mounts, strictly speaking, are there irrespective of ZRAM or not. If you want to verify if that’s running, systemctl status zram-config or similar should do and I’m sure @benjy knows.
Mounting order of /srv/* and ZRAM mounts is what I just revamped (or tried to), see post 61.
If you don’t mind I’d like you to test that code for yourself as well.