If my 'NAS' system in the garage gets powered down and then up again the NFS mounted directories on my desktop system (not surprisingly) stop working and give the message "Stale NFS File Handle".
The problem isn't so much the error but how to get rid of it. I.e. how do I tell my desktop system to throw away the old NFS connections it had to the system in the garage and start again?
I just tried:-
umount --force /nas/backup mount /nas/backup
and it just says "mount.nfs: Stale NFS file handle".
What's "left behind" in the client system that causes this? It can't be at the garage end because that has powered down and rebooted. There must surely be *something* I can remove or kill to get rid of all memory of the old NFS connection in the client.
On Fri, 2008-05-09 at 11:54 +0100, Chris G wrote:
and it just says "mount.nfs: Stale NFS file handle".
What's "left behind" in the client system that causes this? It can't be at the garage end because that has powered down and rebooted. There must surely be *something* I can remove or kill to get rid of all memory of the old NFS connection in the client.
Welcome to the world of NFS :)
Look at the timeo and retrans mount options in the nfs man page, I have both set to 1 which seemed to cure the problem for me. You can also experiment with soft or intr and you might also want to look at the retry option as the defaults are quite long !
Another thing you might have to watch for is any processes that still think they have hold of something in the nfs mount whilst you are trying to remount it, lsof will reveal them of course.
On Fri, May 09, 2008 at 08:30:53PM +0100, Wayne Stallwood wrote:
On Fri, 2008-05-09 at 11:54 +0100, Chris G wrote:
and it just says "mount.nfs: Stale NFS file handle".
What's "left behind" in the client system that causes this? It can't be at the garage end because that has powered down and rebooted. There must surely be *something* I can remove or kill to get rid of all memory of the old NFS connection in the client.
Welcome to the world of NFS :)
Oh it's nothing new, I've seen "Stale NFS file handle" on our Solaris systems at work since the year dot! :-)
Look at the timeo and retrans mount options in the nfs man page, I have both set to 1 which seemed to cure the problem for me. You can also experiment with soft or intr and you might also want to look at the retry option as the defaults are quite long !
Another thing you might have to watch for is any processes that still think they have hold of something in the nfs mount whilst you are trying to remount it, lsof will reveal them of course.
Thanks for the pointers, they should get me on my way, I hope.