Red Hat Bugzilla – Bug 431477
mounting gets stale fh when exporting filesystems without a fsid= option
Last modified: 2014-06-18 03:37:23 EDT
Export a filesystem like this from a rhel5 box with current nfs-utils (I'm using
-30.el5, not sure exactly when this was broken):
...then try to mount from a client:
# mount server:/export /mnt/rhel5
mount: Stale NFS file handle
...what's happening is that the auth.unix.ip and nfsd.export upcalls are working
correctly, but the nfsd.fh upcall fails to match the export and tell the kernel
to which path the filehandle corresponds. So the kernel ends up returning a
stale FH error back to the client.
The problem is a bad check in nfsd_fh. Patch to fix this follows. Frank Filz
from IBM mentioned the same patch in bug 315401 (along with a few others). He
mentioned that he had posted it to the list, but I can't seem to find it. The
problem also seems to extend beyond exports with crossmnt set.
Created attachment 293942 [details]
patch -- only apply fsid related checks in nfsd_fh when fsidtype == 1
Looks like the regression was probably introduced in:
Steve -- does the patch in comment #1 look OK?
Created attachment 294114 [details]
purposed RHEL5 patch
fixed in nfs-utils-1.0.9-31.el5
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.