Summary: Stale NFS Handle

From: Lennon, Padraig <Padraig.Lennon_at_Pioneerinvest.ie>
Date: Tue Jan 15 2002 - 09:39:12 EST
Hi Guru's,
Thanks for all the swift replies. I realised i had given a very skimpy
overview of the problem in my original mail.
I am running Solaris 7, using NIS and had been mounting my home directly
remotely via automount.
I then switched my home directory to a different server for space reasons,
and gave /home/plennon time to umount automatically with automounter. It did
not though and caused the stale handle problem. Because it was Solaris 7 i
could not use 
umount -f /home/plennon. 
The solution was provided by both Dave Zarnoch, and John E.Riddoch, both of
whom suggested i use lsof to find out which process was actually still
holding a file descriptor for /home/plennon.
This is the solution:

bash-2.02$ lsof /home/plennon
lsof: WARNING: can't stat() nfs file system /home/plennon
      Output information may be incomplete.
      assuming "dev=2d40099" from /etc/mnttab
lsof: WARNING: access /home/plennon/.lsof_fame: Stale NFS file handle
lsof: WARNING: can't unlink /home/plennon/.lsof_fame: Stale NFS file handle
COMMAND   PID USER   FD   TYPE  DEVICE SIZE/OFF   NODE NAME
smbd    19358 root  cwd   VDIR 181,153      512 338091 /home/plennon
(<remote_host>:/export/home/plennon). 

I had been using samba to access my home directory when it happened.
When i restarted this process I got the following:

bash-2.02$ lsof /home/plennon
lsof: WARNING: can't stat() nfs file system /home/plennon
      Output information may be incomplete.
      assuming "dev=2d40099" from /etc/mnttab
lsof: WARNING: access /home/plennon/.lsof_fame: Stale NFS file handle
lsof: WARNING: can't unlink /home/plennon/.lsof_fame: Stale NFS file handle

Then i simply umounted /home/plennon with no problems. 

lsof is a very useful tool which i had recently started to use on test
machines but had been unwilling to install on a production server. 

Thanks also to the following people who replied with solutions: 	
Barazani
Sean Bourke
Kumar Shravan
Mark McManus
Robert Reynolds
Tan Tshun Kiat
Thomas Anders
Wesley Suess.

regards,
Padraig					

<original message>

Hi Guru's
Quick NFS question. Is there any known way of clearing stale nfs handles
without rebooting the machine.
The machine in question is a production machine, and the share in question
is my home directory. The only solution that i know of is rebooting. Has
anyone got over this problem?

This is the output from df -k
df: cannot statvfs /home/plennon: Stale NFS file handle


I will summarise.
Thanks in advance,
Padraig 
	




**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Tue Jan 22 17:58:02 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:32 EST