2008-05-20 14:07:58

by Allard Hoeve

[permalink] [raw]
Subject: [NFS] NFSv3 + SVN + Apache2 gives stale filehandles and FORBIDDEN responses

Hello all,

I'm currently experiencing the following on Debian Etch (nfsv3,


It is properly summarized by J. Bruce Fields at:


I can reproduce this easily.

Let's assume three hosts:

* Host A is where development happens, this has a separate checkout
* Host B is where the checkout gets updated (shellserver) on an NFS mount
* Host C is where the webserver resides, Apache serves from the an NFS
mount that points to the same server as B's NFS mount points to

This setup is easily created if you have two hosts and access to an SVN

To reproduce:

1) I update the testfile on host A and commit it.
2) I update the checkout with svn commit on host B.
3) No I test the file on host C:
a) I try to access the file on host C through the webserver: permission
denied (stale NFS handle)
b) I try to stat the file: cannot stat 'test': Stale NFS file handle
4) A simple 'cat test' gives me the new contents of 'test' and solves the
problem. The file is now 'stat'-able and downloadable through the

Where should I start to solve the problem? From the threads above, I seem
to understand that fixing this in userspace (Apache2 / stat) would require
some work and that the solution lies in the NFS client? This would require
me hacking the NFS kernel code. *shivers* :)

Or maybe there already is someone working on the problem? *crosses
fingers*. I could test patches, etc if you'd like.x

Thanks for your time,


Allard Hoeve

This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
NFS maillist - [email protected]
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.