Bug 1157223 - nfs mount via symbolic link does not work
Summary: nfs mount via symbolic link does not work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: nfs
Version: mainline
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jiffin
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 991300 1021998 1161573
TreeView+ depends on / blocked
 
Reported: 2014-10-26 10:25 UTC by Niels de Vos
Modified: 2015-05-14 17:44 UTC (History)
9 users (show)

Fixed In Version: glusterfs-3.7.0
Clone Of: 1021998
Environment:
Last Closed: 2015-05-14 17:28:06 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
Packet trace of gluster nfs server and kernel nfs server (56.57 KB, text/plain)
2014-11-03 13:27 UTC, Jiffin
no flags Details

Description Niels de Vos 2014-10-26 10:25:07 UTC
+++ This bug was initially created as a clone of Bug #1021998 +++
+++                                                           +++
+++ Use this bug to post patches to the master branch.        +++

Description of problem:

We are using the function to export all sub-directories in a gluster volume via nfs. For real directories it works fine but if we have a symbolic link which points to the directory, it is not possible to mount that directory via nfs and the name of the link.

gluster volume on server:

drwxr-xr-x 2 root root 6 Oct 22 14:24 folder
lrwxrwxrwx 1 root root 7 Oct 22 14:24 link -> folder/


nfs mount on client:

[root@gfs01 ~]# mount -t nfs -o vers=3 172.29.1.70:/gv0/link /nfs/
mount.nfs: an incorrect mount option was specified
[root@gfs01 ~]# mount -t nfs -o vers=3 172.29.1.70:/gv0/folder /nfs/
[root@gfs01 ~]# 


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. create and start a volume
2. create a directory in the volume
3. create a symbolic link to the directory in the volume 
4. try to mount from client the sub-directory via nfs an the name of the link

Actual results:

mount.nfs: an incorrect mount option was specified

Expected results:

mount to be successful 

Additional info:

--- Additional comment from jiademing on 2014-01-08 04:15:52 CET ---

I reproduce the issue, In my opinion, the link only point a relative path, then the NFS client can not analysis the relative path.
But in glusterfs server volume, can not create a absolute path symlink for the real sub directories.

--- Additional comment from John Skeoch on 2014-09-22 00:55:32 CEST ---

User spradhan's account has been closed

--- Additional comment from Niels de Vos on 2014-09-30 18:25:36 CEST ---

It seems that the Linux kernel NFS-server allows mounting a symlink pointing to a directory. One requirement is that the target of the symlink points to a directory that is available on the export (I have not done any detailed permission checks).

Comment 1 Jiffin 2014-11-03 13:27:14 UTC
Created attachment 953099 [details]
Packet trace of gluster nfs server and kernel nfs server

The information send to nfs client from kernel nfs server about the directory and symlinks is seems to be same.

Where in the case of gluster nfs server , information differently to the nfs client about the directory and symlink.

So client won't understand information about symlink from gluster nfs server and discard it

The packet trace of client for kernel nfs and gluster nfs is given here

Comment 2 Anand Avati 2014-11-05 08:59:02 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : mount via symbolic link does not work) posted (#1) for review on master by jiffin tony Thottan (jthottan)

Comment 3 Anand Avati 2014-11-06 14:44:23 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : mount via symbolic link does not work) posted (#2) for review on master by jiffin tony Thottan (jthottan)

Comment 4 Anand Avati 2014-11-06 15:11:00 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : mount via symbolic link does not work) posted (#3) for review on master by jiffin tony Thottan (jthottan)

Comment 5 Anand Avati 2014-11-06 15:12:18 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : mount via symbolic link does not work) posted (#4) for review on master by jiffin tony Thottan (jthottan)

Comment 6 Anand Avati 2014-11-07 10:46:27 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : mount via symbolic link does not work) posted (#5) for review on master by jiffin tony Thottan (jthottan)

Comment 7 Anand Avati 2014-11-10 11:23:01 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : make it possible to mount a subdir that actually is a symlink) posted (#6) for review on master by jiffin tony Thottan (jthottan)

Comment 8 Anand Avati 2014-11-10 11:53:02 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : make it possible to mount a subdir that actually is a symlink) posted (#7) for review on master by jiffin tony Thottan (jthottan)

Comment 9 Anand Avati 2014-11-10 12:14:03 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : make it possible to mount a subdir that actually is a symlink) posted (#8) for review on master by jiffin tony Thottan (jthottan)

Comment 10 Anand Avati 2014-11-10 13:59:22 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : make it possible to mount a subdir that actually is a symlink) posted (#9) for review on master by jiffin tony Thottan (jthottan)

Comment 11 Anand Avati 2014-11-12 07:37:04 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : make it possible to mount a subdir that actually is a symlink) posted (#10) for review on master by jiffin tony Thottan (jthottan)

Comment 12 Anand Avati 2014-11-12 08:52:49 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : make it possible to mount a subdir that actually is a symlink) posted (#11) for review on master by jiffin tony Thottan (jthottan)

Comment 13 Anand Avati 2014-11-12 09:32:26 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : make it possible to mount a subdir that actually is a symlink) posted (#12) for review on master by jiffin tony Thottan (jthottan)

Comment 14 Anand Avati 2014-11-12 12:02:47 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : make it possible to mount a subdir that actually is a symlink) posted (#13) for review on master by jiffin tony Thottan (jthottan)

Comment 15 Anand Avati 2014-11-13 05:38:30 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : make it possible to mount a subdir that actually is a symlink) posted (#14) for review on master by jiffin tony Thottan (jthottan)

Comment 16 Anand Avati 2014-11-13 10:02:33 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : make it possible to mount a subdir that actually is a symlink) posted (#15) for review on master by jiffin tony Thottan (jthottan)

Comment 17 Anand Avati 2014-11-13 14:16:42 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : make it possible to mount a subdir that actually is a symlink) posted (#16) for review on master by Niels de Vos (ndevos)

Comment 18 Anand Avati 2014-11-13 14:17:02 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : make it possible to mount a subdir that actually is a symlink) posted (#17) for review on master by Niels de Vos (ndevos)

Comment 19 Anand Avati 2014-11-13 18:49:59 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : make it possible to mount a subdir that actually is a symlink) posted (#18) for review on master by jiffin tony Thottan (jthottan)

Comment 20 Anand Avati 2014-11-14 10:44:21 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : make it possible to mount a subdir that actually is a symlink) posted (#19) for review on master by jiffin tony Thottan (jthottan)

Comment 21 Anand Avati 2014-11-14 11:13:23 UTC
REVIEW: http://review.gluster.org/9052 (gNFS : make it possible to mount a subdir that actually is a symlink) posted (#20) for review on master by jiffin tony Thottan (jthottan)

Comment 22 Anand Avati 2014-11-14 14:40:35 UTC
COMMIT: http://review.gluster.org/9052 committed in master by Niels de Vos (ndevos) 
------
commit fdef42e82d66011a3a92c9c96db4ada2fa8d4814
Author: jiffin <jthottan>
Date:   Tue Nov 4 20:33:01 2014 +0530

    gNFS : make it possible to mount a subdir that actually is a symlink
    
    We are using the function to export all sub-directories in a gluster volume via nfs.
    For real directories it works fine but if we have a symbolic link which points to the
    directory, it is not possible to mount that directory via nfs and the nameof the link.
    Kernel nfs resolves symlink handle to directoryhandle , similar gluster nfs should
    resolve the symbolic link handle into directory handle.
    
    Change-Id: I8bd07534ba9474f0b863f2335b2fd222ab625dba
    BUG: 1157223
    Signed-off-by: jiffin tony thottan <jthottan>
    Reviewed-on: http://review.gluster.org/9052
    Reviewed-by: soumya k <skoduri>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Jeff Darcy <jdarcy>
    Reviewed-by: Niels de Vos <ndevos>

Comment 23 Niels de Vos 2015-05-14 17:28:06 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 24 Niels de Vos 2015-05-14 17:35:39 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 25 Niels de Vos 2015-05-14 17:38:01 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 26 Niels de Vos 2015-05-14 17:44:20 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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