Hide Forgot
Mounting a glusterfs volume with option "ro" (read only) works correctly, but when mounts are printed using the 'mount' command the mount option "rw" (read/write) appears where "ro" should be. To reproduce: # mount -t glusterfs localhost:test /mnt/test -o ro # touch /mnt/test/write touch: cannot touch `/mnt/test/write': Read-only file system # mount ... localhost:test on /mnt/test type fuse.glusterfs (rw,allow_other,default_permissions,max_read=131072) Even though the mount is clearly read-only, it is reported as being writable. Thanks!
(In reply to comment #0) > Mounting a glusterfs volume with option "ro" (read only) works correctly, but > when mounts are printed using the 'mount' command the mount option "rw" > (read/write) appears where "ro" should be. While I agree that this is confusing, both the behavior and the mount output is correct. The "ro" or "rw" flags reported by mount(8) means a _kernel-level_ read-only / read-writable mode. Glusterfs' read-only mode is not implemented at the kernel level, but within the software. What we could possibly do to fight the confusion: - introduce a "-oread_only" mount option in mount.glusterfs mount helper which maps to glusterfs' "--read-only" option; keep existing "-oro" but make it deprecated (ie. give a deprecation warning and point to -oread_only if used). This way we can move away from abusing "-oro", which is indeed documented to refer to kernel-level read-onliness (cf. mount(8)). - make it clear in documentation that we implement read-only mode in our scope - add a "gluster mount" command which is analogous to mount(8) but is restricted to glusterfs mounts and displays glusterfs specific informations -- like read-onliness @kaushal: please comment which approach(es) you prefer (feel free to prefer something different than my above ideas).
Csaba, Among the 3 approaches, I believe the gluster specific mount command would be the best. The other two, while easier to do, might lead to more confusion in users. I also have a question. Would it cause any problems if kernel ro mode and gluster ro mode are in use? I've submitted a patch for review (review.gluster.com/655), that causes the kernel ro mode to be enabled when mounting gluster in read-only. This seems to solve the problem.
(In reply to comment #2) Sure, this is the most straightforward approach, and then we can forget of the 3 approaches which I found out to wrap up the conceptual difference (so now, we rather just eliminate conceptual differences ;)). Kernel-level ro as such is completely fine, what I had a problem with was the redundancy of the twofold ro.
CHANGE: http://review.gluster.com/655 (Enables kernel read-only mode on mounting with '-oro' and disables the gluster) merged in master by Vijay Bellur (vijay)