Heavy disk write actions on Raspi - Config Backup File is rewritten every second

Hello, i’m new in the forum but i use OH since one year.

I discovered the OH is writing a lot of data continuously to to one file:/var/lib/openhab/tmp/fileinstall-2825166305315981055e/etc.jar

grafik

The size of the file is nearly constant. When I delete it, it is recreated immediately. Each second the file is rewritten.

IOTOP shows: (sorry I can only put one file into this post)

  TID  PRIO  USER     DISK READ DISK WRITE>    COMMAND
  945 be/4 openhab     0.00 B/s  190.17 K/s  java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dope~/openhab/runtime/lib/jdk9plus/txw2-2.3.8.jar org.apache.karaf.

The JAR file isn’t a Java file - it’s a simple archive with configuration files:

unzip -l etc.jar
Archive:  etc.jar
  Length      Date    Time    Name
---------  ---------- -----   ----
      252  2024-06-09 07:36   java.util.logging.properties
        0  2024-06-09 07:36   scripts/
    12413  2024-06-09 07:36   scripts/shell.completion.script
     1251  2024-06-09 07:36   scripts/shell.colors.script
     2098  2024-06-09 07:36   keys.properties
     1219  2024-06-09 07:36   org.apache.karaf.command.acl.kar.cfg
     4790  2024-06-09 07:36   org.apache.karaf.shell.cfg
     2025  2024-06-09 07:36   org.apache.karaf.command.acl.config.cfg
       22  2024-06-09 07:36   org.openhab.voice.cfg
     1897  2024-06-09 07:36   shell.init.script
      786  2024-06-09 07:36   branding-ssh.properties
     1737  2024-06-09 07:36   org.apache.karaf.command.acl.bundle.cfg
     1376  2024-06-09 07:36   org.apache.karaf.command.acl.scope_bundle.cfg
     1318  2024-06-09 07:36   jetty-web.xml
      604  2024-06-09 07:36   keystore
     1525  2024-06-09 07:36   users.properties
     1122  2024-06-09 07:36   org.apache.karaf.jaas.cfg
      762  2024-06-09 07:36   org.apache.karaf.log.cfg
      493  2024-06-09 07:36   org.apache.felix.eventadmin.impl.EventAdmin.cfg
      269  2024-06-09 07:36   custom.system.properties
     1154  2024-06-09 07:36   org.apache.karaf.command.acl.jaas.cfg
        0  2024-06-09 07:36   overrides.properties
     3281  2024-06-09 07:36   org.apache.karaf.features.cfg
     1141  2024-06-09 07:36   org.apache.karaf.command.acl.feature.cfg
      317  2024-06-09 07:36   custom.properties
       65  2024-06-09 07:36   org.jupnp.cfg
     5547  2024-06-09 07:36   system.properties
     4437  2024-06-09 07:36   jetty.xml
      420  2024-06-09 07:36   org.apache.felix.fileinstall-deploy.cfg
     4616  2024-06-09 07:36   equinox-debug.properties
     1118  2024-06-09 07:36   org.apache.karaf.command.acl.shell.cfg
    17075  2024-06-09 07:36   config.properties
     5887  2024-06-09 07:36   log4j2.xml
     1176  2024-06-09 07:36   org.apache.karaf.features.xml
     3799  2024-06-09 07:36   org.apache.karaf.features.repos.cfg
     7147  2024-06-09 07:36   profile.cfg
      786  2024-06-09 07:36   branding.properties
     5637  2024-06-09 07:36   org.ops4j.pax.url.mvn.cfg
    15528  2024-06-09 07:36   jre.properties
       65  2024-06-09 07:36   org.ops4j.pax.logging.cfg
     1144  2024-06-09 07:36   distribution.info
     3316  2024-06-09 07:36   jmx.acl.org.apache.karaf.config.cfg
      342  2024-06-09 07:36   version.properties
     1664  2024-06-09 07:36   jmx.acl.org.apache.karaf.bundle.cfg
      532  2024-06-09 07:36   org.apache.karaf.kar.cfg
     1035  2024-06-09 07:36   all.policy
       33  2024-06-09 07:36   org.openhab.audio.cfg
     1384  2024-06-09 07:36   org.apache.karaf.command.acl.system.cfg
     1346  2024-06-09 07:36   org.ops4j.pax.web.cfg
     1218  2024-06-09 07:36   startup.properties
---------                     -------
   127169                     50 files

I don’t know, why OH do this and to solve this.

I am grateful for any help.

I just checked in my installation but I got no activity in /var/lib/openhab/tmp. There are two folders that start with fileinstall but both are empty.
My wild guess would be that some installation routine (maybe a binding) didn’t complete successfully.
Have you tried to clean the cache with openhab-cli?

Thank you for your answer.

In the meantime, I have investigated further and the setting in the file “/var/lib/openhab/etc/config.properties” - “felix.fileinstall.poll” was the cause.

It originally said 1000, which corresponds to one second. Now I have set the value to 600000 (=10 minutes).

Now the file is created every 10 minutes. However, I cannot say why this is generated so extensively in my case. I suspect that the /var/lib/openhab/etc/ directory is monitored here and the backup is triggered after this time in the event of changes. However, nothing definitely changes in this directory.

I monitor the SSD usage and saw the disk wrote about 200 GB per week. The used space grow up only by few MB on the disk. This made me curious and I tried to find out why.

Update:
I found a duplicate etc folder underneath “/var/lib/openhab/etc/” - I don’t know why. I removed this folder and changed the setting in the configuration file back to 1000, cleared the cache and restarted openhab.
Now the fileshare-* folder no longer contains any files and disk usage is normal.

A few weeks ago I had a problem with the SSD and after a reboot the diskcheck did some repairs. Maybe that’s where this is coming from… Who knows.

I think, the issue is solved - for now. Thank you for your assistance.

1 Like

you removed /var/lib/openhab/etc? :grimacing:
This folder contains the properties files…
I don’t think removing is a good idea.

No, I apologize if I have not described this correctly. My English is not that good, I’m from Germany.

Sure.

Below “etc” there was another directory with the name “etc” and there were older configuration files that belonged to the user “root” but with a date of 2023. I moved these as a test and tested everything. OpenHab still ran without any problems. So I deleted these files.

1 Like