File differences possibly related to Zram

I came across something I did not know and temporarily messed things up. I have an openhabian RPI3 with Zram installed. Bottom line is that these two folders that are normally the same can be different. Since there files are both using Zram, I suspect a connection. I’m not sure how they are supposed to sync, but two stories of my adventures below.

/srv/openhab2-log /var/log/openhab2
/srv/openhab2-userdata/persistence/mapdb /var/lib/openhab2/persistence/mapdb

First I like a minimal log file, so I have periodically stopped OH, deleted all the entries and then restarted. I came across a post that suggested I could delete the log file while OH is running and it would just create a new one. I deleted the file in /srv/openhab2-log, but nothing ever came back. However, the file was still in /var/log/openhab2. It took a restart to get the files in sync.

Second when upgrading my other Rpi4 to OH3, I needed to delete the mapdb files to clear an error. Once I found the files were in two places, I went back to my Rpi3 and noticed that the files in the /srv location were dated back in October. We had long power outage back then and I was not around to properly shutdown until my UPS was drained. Unfortunately I did not check /var location at that time. Simply uninstall/install mapdb did not work. Today I uninstalled Mapdb, deleted the mapdb files in both locations, uninstalled Zram, reinstalled Zram, reinstalled MapDB and both locations are synced again.

I also now have a faster method to get the Rpi3 shutdown in the event of a power outage.


Frankly I didn’t get what you want to tell us with this post.

If your installation is a little older you should reinstall /srv links using option 13. There was a problem that by the time /srv is shared ZRAM wasn’t active so only the lower fs was shared not the combined overlay fs you finally access.

I was probably unclear because I did manage to fix my issue and how to avoid it in the future. From your comment, I need to try this option 13 because my problem may because I used an older openhabian version. Thanks for the feedback

Ok, I wasn’t originally looking for a solution, but I believe after running option 13 that it might have solved the problem. My log file that I had been missing reappeared on /srv after running it. A big thanks - Bob

I have one other comment. It is not obvious (to me anyway) that the space bar is how to move the '", until I searched the forum for quite some time. I think allowing a '" to be entered to change the openhabian version might be more instinctive in the following. Just a thought.


edit: Thought of what is probably an easier option. Add sentence in the box above “Use cursor and space bar to change selection”