Bug 853895

Summary: CLI: read only glusterfs mount fails
Product: [Community] GlusterFS Reporter: Rahul Hinduja <rhinduja>
Component: fuseAssignee: Csaba Henk <csaba>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.3.0CC: csaba, gluster-bugs, ndevos, rhs-bugs, vbellur
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 858499 (view as bug list) Environment:
Last Closed: 2013-07-24 17:21:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 980770    
Bug Blocks: 858499    
Attachments:
Description Flags
fuse-bridge: Pass unknown option down to fuse none

Description Rahul Hinduja 2012-09-03 09:28:03 UTC
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

Comment 5 Niels de Vos 2012-10-31 10:49:39 UTC
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 6 Niels de Vos 2012-10-31 14:05:22 UTC
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.

Comment 7 Niels de Vos 2012-11-05 10:27:01 UTC
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

Comment 9 Csaba Henk 2012-11-05 18:25:32 UTC
Reviewed under http://review.gluster.org/4156

Comment 10 Niels de Vos 2012-11-12 08:42:10 UTC
An updated patch is available from http://review.gluster.org/4163

Comment 11 Vijay Bellur 2012-11-19 08:49:48 UTC
CHANGE: http://review.gluster.org/4163 (fuse: handle mountflags properly) merged in master by Vijay Bellur (vbellur)

Comment 13 Niels de Vos 2013-01-21 09:44:33 UTC
Tag v3.4.0qa3 and later contain commit 702b2912970e7cc19416aff7d3696d15977efc2f.