Bug 853895 - CLI: read only glusterfs mount fails
CLI: read only glusterfs mount fails
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: fuse (Show other bugs)
3.3.0
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Csaba Henk
: Regression
Depends On: 980770
Blocks: 858499
  Show dependency treegraph
 
Reported: 2012-09-03 05:28 EDT by Rahul Hinduja
Modified: 2013-07-24 13:21 EDT (History)
5 users (show)

See Also:
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 13:21:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
fuse-bridge: Pass unknown option down to fuse (7.74 KB, patch)
2012-10-31 06:49 EDT, Niels de Vos
no flags Details | Diff

  None (edit)
Description Rahul Hinduja 2012-09-03 05:28:03 EDT
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 06:49:39 EDT
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 10:05:22 EDT
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 05:27:01 EST
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 13:25:32 EST
Reviewed under http://review.gluster.org/4156
Comment 10 Niels de Vos 2012-11-12 03:42:10 EST
An updated patch is available from http://review.gluster.org/4163
Comment 11 Vijay Bellur 2012-11-19 03:49:48 EST
CHANGE: http://review.gluster.org/4163 (fuse: handle mountflags properly) merged in master by Vijay Bellur (vbellur@redhat.com)
Comment 13 Niels de Vos 2013-01-21 04:44:33 EST
Tag v3.4.0qa3 and later contain commit 702b2912970e7cc19416aff7d3696d15977efc2f.

Note You need to log in before you can comment on or make changes to this bug.