Description of problem: Mounting a gluster volume with read only option (-o ro) fails for fuse.glusterfs. Version-Release number of selected component (if applicable): glusterfs 3.3.0rhs built on Aug 17 2012 07:06:59 How reproducible: 1/1 Steps to Reproduce: 1. Mount the volume with read only option using "mount -t glusterfs -o ro <volume> <mount_point> 2. Mount failed with message "Mount failed. Please check the log file for more details." Actual results: [root@unused ~]# mount -t glusterfs -o ro 10.70.1.115:/vol1 /mnt/temp-1/ Mount failed. Please check the log file for more details. [root@unused ~]# Expected results: Mount should be successful in ro mode. Additional info: NFS mount with -o ro option is successful. Also FUSE mount without -o ro option is successful
Created attachment 636015 [details] fuse-bridge: Pass unknown option down to fuse The patch from Bug 852754 seems to work for this too: - http://review.gluster.org/3871 It needs a little changing for the glusterfs version in the RHS-2.0, but is seems to work fine when including a "ro" option in /etc/fstab.
Comment on attachment 636015 [details] fuse-bridge: Pass unknown option down to fuse Further testing showed that the patch does not fix the problem. I guess we really need to update contrib/fuse-lib/mount.c and learn it how to pass mountflags like MS_RDONLY (see 'man 2 mount') to the kernel.
First functional patch posted for review: http://review.gluster.org/4156 Csaba, could you please review this and let me know if the general implementation is acceptable? I am aware that the coding-style in mount.c needs some corrections. This patch adds fuse_opt.{c,h} so that it should be easier to move to fuse-upstream when the selinux options are included there. I have not tested an selinux options with this changeset though. Thanks, Niels
Reviewed under http://review.gluster.org/4156
An updated patch is available from http://review.gluster.org/4163
CHANGE: http://review.gluster.org/4163 (fuse: handle mountflags properly) merged in master by Vijay Bellur (vbellur)
Tag v3.4.0qa3 and later contain commit 702b2912970e7cc19416aff7d3696d15977efc2f.