As my SD Card suffered an early death I’d like to know what files in OH2.1 can be safely moved to a RAM drive, and also what else can be ran from TMPFS but needs persisting between reboots. I already run a read only filesystem with OH and have moved all the logging to TMPFS.
To avoid compatibility problems I have left the contents of /var/lib and /etc/openhab2 on the file system and I’m looking to see whether this is causing repeated writes that have worn out my SD Card.
Looking at the file access dates it seems that /etc/openhab2 isn’t being written to, and that once stable only the persistance in /var/lib/openhab2/persistence/mapdb seems to be hit all the time.
However on reboot a lot off files get their modified dates changed:
All the jar and cfg files in the tree further down /var/lib/openhab2/kar/openhab-addons-2.1.0/org/openhab/ most of these are for addons I DON’T HAVE INSTALLED
a few files in /var/lib/openhab2/cache and /var/lib/tmp
The total writes if my assumptions are correct are 939 files and 279 MB per Reboot which would go some way to explaining my SD Card’s early death.
Assuming I’m correct is there a way of stopping all the JAR’s being recreated after every reboot?