I am running Openhabian, OH 3.4 on a Rpi4 and 64gb SD card, the whole setup is not even running for 1 month now.
I had several problems where I couldn’t create items, I recieved disk space error in frontail logger and also some “Persistence took tlonger than 5000ms” error.
Checking Rpi space, this is what I found out:
So the persistence and zram folders are full causing me errors, while the root partition is sitting on 50gb + free space? So what I tried next was removing 10gb from root partition and wanted to give the free space to the other partitions, but the Rpi isn’t booting anymore now, I think I managed to mess everything up.
I want to do a fresh OH 3.4 install now using Openhabian, and my question is, is there something to prevent this from happen in the future? How to I decide during installation that the root doesn’t need 50gb? Anybody had similar problems and has some advice? Thank you.
Edit: Clearly the best thing would be to just let every partition/folder have as much place as they need till the whole disk is full, why do they have a maximum space amount, makes no sense to me…
Not a linux or zram guru, but I think you are comparing apples and oranges. Zram is in the "volitile (hope i’m using that term correctly) " memory (In Rpi4 the 2GB, 4GB, etc. portion), not the SD card 64GB memory. The whole Zram idea is to avoid frequent writes of active folders and wear out the SD card. Depending on the size (2 GB?) of the Rpi4 you may be able to reset between Zram1 and Zram2
Writing to an SD card wears it out. Each sector can only be written to so many times before it simply stops working. And there is usually little to no warning when this has happened.
openHAB does a lot of writes, especially with persistence and logging. Therefore, in order to extend the life of the SD card, openHABian employs ZRAM. This is a service that creates “disks” that only live in RAM. This makes it so writes take place only in RAM and do not hit the SD card. The contents of ZRAM are only written to the SD card on a normal shutdown. This can make your SD card last for a lifetime instead of wearing out in a year or so.
Given this, the only way to “just let every partition/folder” use the whole disk is to disable ZRAM. But of course that also means your SD card will wear out much sooner.
You can enable ZRAM in menu option 38 in openhabian-config. You can change the amount of RAM dedicated to an overlay by editing /etc/ztab and give the persistence disk more space. Just be aware that the more space you give it the less RAM you have to actually run programs on the machine.
Oh right. Interesting, haven’t encountered a system that big in a while.
Increase its size in /etc/ztab then.
Or remove it there and mount a separate USB stick to the persistence dir root so if that crashes it doesn’t affect your whole system.