Bug 853895 - CLI: read only glusterfs mount fails
Summary: CLI: read only glusterfs mount fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: fuse
Version: 3.3.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Csaba Henk
QA Contact:
URL:
Whiteboard:
Depends On: 980770
Blocks: 858499
TreeView+ depends on / blocked
 
Reported: 2012-09-03 09:28 UTC by Rahul Hinduja
Modified: 2013-07-24 17:21 UTC (History)
5 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 858499 (view as bug list)
Environment:
Last Closed: 2013-07-24 17:21:31 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


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

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.


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