I have a rw file system /myraid0.# cat /proc/mounts | grep myraid0/dev/mapper/isw_cfdbejjgdi_myraid0p1 /myraid0 ext4 rw,relatime,stripe=8,data=ordered 0 0I have no problem writing to /myraid0 as any user.redis@host:~$ echo hi > /myraid0/tmp/redis/testredis@host:~$ cat /myraid0/tmp/redis/testhiHowever, my process can't write a file on /myraid0, due to EROFS (Read-only file system).open(temp-4036.rdb, O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EROFS (Read-only file system)This shows the process views the mount as ro.# cat /proc/15920/mounts | grep myraid0/dev/mapper/isw_cfdbejjgdi_myraid0p1 /myraid0 ext4 ro,relatime,stripe=8,data=ordered 0 0Why does the process only have read only view of the mount?Thanks!Additional detailsUbuntu 16.04Linux jeff-apartment-2015 4.4.0-36-generic #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016 x86_64 x86_64 x86_64 GNU/LinuxApp is redis-server. It's failing to save the snapshots to a non-root deviceRedis error isFailed opening .rdb for saving: Read-only file systemInstalled version 3.0.6 via apt-getLaunched by systemdListing of /proc/15920/ns (requested by @VenkatC):lrwxrwxrwx 1 redis redis 0 Sep 16 05:39 cgroup -> cgroup:[4026531835]lrwxrwxrwx 1 redis redis 0 Sep 15 18:03 ipc -> ipc:[4026531839]lrwxrwxrwx 1 redis redis 0 Sep 15 18:03 mnt -> mnt:[4026532343]lrwxrwxrwx 1 redis redis 0 Sep 15 18:03 net -> net:[4026531957]lrwxrwxrwx 1 redis redis 0 Sep 15 18:03 pid -> pid:[4026531836]lrwxrwxrwx 1 redis redis 0 Sep 15 18:03 user -> user:[4026531837]lrwxrwxrwx 1 redis redis 0 Sep 15 18:03 uts -> uts:[4026531838]apparmor_status  | grep redis returns nothing (requested by @Gilles)Nothing else in the logs more informative than the strace output.Process namespacesWorking bash shell for redis userls -l /proc/7359/ns/mntlrwxrwxrwx 1 redis redis 0 Sep 15 18:03 /proc/7359/ns/mnt -> mnt:[4026531840]Not working redis processls -l /proc/15920/ns/mntlrwxrwxrwx 1 redis redis 0 Sep 15 18:03 /proc/15920/ns/mnt -> mnt:[4026532343]Working bash shell for my userls -atlrh /proc/7138/ns/mntlrwxrwxrwx 1 jeff jeff 0 Sep 15 18:03 /proc/7138/ns/mnt -> mnt:[4026531840]
Process mount is read only
filesystems;systemd;redis
As you can see, redis process is running in it's own 'mount namespace', with readonly option.Redis proc started by Systemd [/proc/15920/ns/mnt] -> mnt:[4026532343]your shell [/proc/7138/ns/mnt] -> mnt:[4026531840]Look at systemd unit for the redis-server startup and update options related to the mountflags to suit your needsLooking at redis-server systemd unit file, I see below settings# grep -i readwrite /etc/systemd/system/redis.service ReadWriteDirectories=-/var/lib/redisReadWriteDirectories=-/var/log/redisReadWriteDirectories=-/var/run/redisReadWriteDirectories=-/etc/redisso you could add /myraid0 as an additional ReadWriteDirectories and restart redis service