S
S
StopDesign2017-05-11 20:58:48
Redis
StopDesign, 2017-05-11 20:58:48

Why does Redis save data to only one partition?

It so happened that on my server the SSDs are divided into several partitions with different RAID configurations:

/         ext4    errors=remount-ro
/boot     ext4    defaults
/data     ext4    defaults

Redis was configured by default to store its rdb dump in /var/lib/redis. But the section is over. We need to move the dump to a large partition mounted at /data.
I created /data/redis, set the owner to redis:redis, permissions 755. Redis refuses to save anything to this directory:
Failed opening .rdb for saving: Read-only file system.
I tried different places (everywhere it is checked that the redis user can create and edit files):
/data/redis - does not write
/data - does not write
/var/lib/redis - writes
/tmp - writes
/tmp/redis - writes
/boot/ redis - does not write
The problem repeats only when started through service redis start.
When run (in daemon mode) with the redis-server /etc/redis/redis.conf command as a redis user, there is no problem.
Linux 4.4.0-77-generic #98-Ubuntu SMP Wed Apr 26 08:34:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Package: redis-server
Version: 2:3.0.6-1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
A1estro, 2017-05-12
@A1estro

have you looked at dmesg?
Can apparmor block if it is set.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question