I'm running Redis 4.0.9 on Ubuntu 18.04.1 LTS with a custom data dir for the RBD file.
To make this work, besides updating the
redis.conf to the new location, I also had to update
/etc/systemd/system/redis.service and set:
Everything was working fine, until suddenly one day Redis started giving the
Failed opening the RDB file backup.rdb (in server root dir /var/lib/redis) for saving: Read-only file system error again, as if the
ReadWriteDirectories was not set to the new data dir.
/etc/systemd/system/redis.service and the
ReadWriteDirectories entry I added was indeed gone. I added it back and, after restarting, Redis works fine again and can sava data.
My question is: how could
/etc/systemd/system/redis.service change and my
ReadWriteDirectories line disappear? I am the only one with access to this machine. Is this file overwritten automatically in some cases? Can I disable that?