Bug 99132

Summary: NFS doesn't handle re-exported (nested) directories well - recurring problem
Product: [Retired] Red Hat Linux Reporter: Jeff Albro <jeff>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: mattdm
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-06-16 17:10:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeff Albro 2003-07-14 20:40:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624

Description of problem:

If you put nested directories, such as:

/export   foo.com(rw,sync)
/export/opt   foo.com(rw,sync)

nfsd will fail EVENTUALLY, with at least one randomly selected client, giving
/var/log/messages errors like this:

Jun 23 15:49:19 server rpc.mountd: authenticated mount request from
client:1015 for /export/home4/user (/export)
Jun 23 15:49:19 server rpc.mountd: getfh failed: Operation not permitted

You can fix this temporarily by:

/etc/init.d/nfs stop
rm -rf /var/lib/nfs/xtab
/etc/init.d/nfs start

And when the client cannot mount the directory, you can confirm the problem with
the command:

exportfs -r -v

which will show the problem with the specific client(s).  

I have found this with linux clients and sun clients of various versions.

This appears related to bug number 5689, and seems to have been around for a
while, based upon the number of problems posted in usenet and other locations.

While the LINUX NFS-HOWTO says "if a directory is exported, its parent and child
directories cannot be exported if they are in the same filesystem", I feel that
nfsd should either fail all the time, refuse to run, or give some sort of
sensible error message.  The fact that this problem has been around for so long
and several people have run into it means to me that a better solution than
"Don't do that" should be found.

Thanks!

-Jeff

Version-Release number of selected component (if applicable):
nfs-utils-1.0.1-2.9

How reproducible:
Sometimes

Steps to Reproduce:
1. Created nested entries in /etc/exports
2. Start nfs server
3. Have several (I have 30-40) clients make requests
4. Eventually (immediately to 1 day) you will have an error

Additional info:

Comment 1 Steve Dickson 2004-06-16 17:10:46 UTC
I am unable to reproduce this with later versions of 
the kernel and nfs-utils