UPDATE
Reinstalled everything but the problem persists. InfluxDB stops working each time after reboot. But now I know how to fix it.
This is some problem with access rights. I change ownership of data files to non-root user and then back to influxdb user:
sudo chown -R 1000:1000 /var/lib/influxdb
sudo chown -R influxdb:influxdb /var/lib/influxdb
and the InfluxDB comes back. Even no need to restart the service (just need to wait couple of seconds).
So, I have workaround to the problem but have no idea whats going on there. And my workaround doesn’t solve the problem completely because after each reboot the database is not starting automatically, so I need to enter the two commands above.
I can just imagine that there might be a problem with data buffering in RAM, so the process which flushes data to the sd card influences meta-data. But it’s just guessing, I’m not competent in Linux.
If anyone can explain what’s going on or can help to fix it - I’ll appreciate!