Bug 959477

Summary: nfs-server: stale file handle when attempting to mount directory
Product: [Community] GlusterFS Reporter: Michael Brown <michael>
Component: nfsAssignee: bugs <bugs>
Status: CLOSED EOL QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.4.0-alphaCC: bugs, gluster-bugs, ndevos, rjoseph, vagarwal
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-07 14:05:11 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:

Description Michael Brown 2013-05-03 15:14:08 UTC
Description of problem: Attempting to mount NFS directory fails with 'stale file handle'

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

How reproducible: 100%

Steps to Reproduce:
1. Have Gluster volume /gv0 exported with Gluster's NFS server
2. On client: mount server:/gv0/scratch/test /mnt/tmp
3. On client: umount /mnt/tmp
4. On server: rm -rf /gv0/scratch/test
5. On server: mkdir /gv0/scratch/test
6. On client: mount server:/gv0/scratch/test /mnt/tmp
  
Actual results:
Step 6 fails with:
client: mount.nfs: Remote I/O error
server:
[2013-05-03 14:56:08.532039] E [mount3.c:562:mnt3_resolve_subdir_cbk] 0-nfs: path=/scratch/test (Stale file handle)
[2013-05-03 15:00:03.161396] W [client-rpc-fops.c:2624:client3_3_lookup_cbk] 0-g
v0-client-0: remote operation failed: Stale file handle. Path: /scratch/test (8fd71bcb-abaa-4c0b-a848-5a9f2164cd10)


Expected results:
Should work normally

Additional info:
Restarting the gluster nfs server allows it to work again.

Comment 2 Niels de Vos 2014-09-30 14:48:57 UTC
Steps to reproduce are very clear. When a mount request comes in, we should probably re-validate the filehandle for the path that is being mounted.

Comment 3 Niels de Vos 2015-05-17 21:59:10 UTC
GlusterFS 3.7.0 has been released (http://www.gluster.org/pipermail/gluster-users/2015-May/021901.html), and the Gluster project maintains N-2 supported releases. The last two releases before 3.7 are still maintained, at the moment these are 3.6 and 3.5.

This bug has been filed against the 3,4 release, and will not get fixed in a 3.4 version any more. Please verify if newer versions are affected with the reported problem. If that is the case, update the bug with a note, and update the version if you can. In case updating the version is not possible, leave a comment in this bug report with the version you tested, and set the "Need additional information the selected bugs from" below the comment box to "bugs".

If there is no response by the end of the month, this bug will get automatically closed.

Comment 4 Kaleb KEITHLEY 2015-10-07 14:05:11 UTC
GlusterFS 3.4.x has reached end-of-life.

If this bug still exists in a later release please reopen this and change the version or open a new bug.