I agree, but you simply admit that the NFS client doesn't seem to know, when the server was restart. The simpliest thing i can imagine, is that the NFS server generates a random integer-value at start, and transmits it along with ESTALE. If the integer-value is different from the integer-value the server send while mounting the FS, than the kernel has to remount it transparently. This is a simple thing so that a client can safely determine, if the server has been restarted, or not, and it only adds 4 byte to some nfs-packets.
No.... The simplest thing is for the server to actually abide by the
RFCs and not generate filehandles that change on reboot.
NFSv4 is the ONLY version of the protocol that actually supports the
concept of filehandles that have a finite lifetime.
In my case, if the nfs directory is mounted to /mnt/nfs, i can't even do a simple "cd /mnt/nfs" without getting the "stale nfs handle" - even if i use a different shell. I always thought, that the "cd /mnt/nfs" should work, since the shell will aquire a new handle, but it doesn't work :-(
It won't if the root filehandle is broken too. That is the standard way
of telling the NFS client that the administrator has revoked our access
to the filesystem.
The solution is simple here: fix the broken server...