LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 11-16-2004, 12:23 AM   #1
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
Stale NFS handle - how to recover w/o reboot?


I powered off my NFS file server without unmounting all the nfs clients first. Now that it's back on, my nfs clients get a "Stale nfs handle" on the nfs share. I can get it back by rebooting them all (the clients), but is there a way to get it working again without rebooting?

I tried unmounting & remounting the nfs share, but I can't unmount, I get "device is busy"

I also tried stopping portmap & nfs on the client & then restarting them. no luck.

ideas?

I know I can always reboot, but I'd rather not.

Thanks.

Last edited by BrianK; 11-16-2004 at 12:26 AM.
 
Old 11-16-2004, 01:19 AM   #2
eflester
Member
 
Registered: Sep 2003
Location: Washington
Distribution: RH9, SuSE 9.0, Slackware 10, Mandrake 10, Debian woody & sarge, FC2-3, OpenBSD
Posts: 71

Rep: Reputation: 17
When I try to umount, I almost always have to use the -l option (that's an L) or I get the "busy" signal. And although you probably already know this, I always forget: you can't be in the directory you're trying to unmount. Go up a level or two, and try umount-l.

Also, you can try just restarting the nfs service on the clients and/or server. Not knowing what distro you are using I can't be specific, but often this can be done as simply as #service nfs restart.
 
1 members found this post helpful.
Old 08-10-2005, 10:37 AM   #3
thrombomodulin
LQ Newbie
 
Registered: Dec 2003
Location: MI, USA
Distribution: FC 2
Posts: 14

Rep: Reputation: 0
NFS stale file handle on server reboot

Hello,

I also find that when a server exporting a NFS directory is rebooted, that any client that has this directory mounted will normally never recover. The error message reported on the client is "Stale NFS file handle". Even when all files are closed, the command 'umount -l' or 'umount -f' will not unmount the directory (device busy error).

*** How can this be solved without rebooting the client? ***

This occurs when exported directories are RAID0 arrays that have two (or more) SCSI disks. However, when I tested this using another machine exporting from a IDE non-raid disk the client does recover. In the case of the RAID0 array, the 'fsid' export option was used, but nevertheless failure still occurs when the sever reboots.

FYI: The OS is redhat linux 9.

Does anyone have any ideas?

Thanks,
 
Old 08-10-2005, 01:27 PM   #4
eflester
Member
 
Registered: Sep 2003
Location: Washington
Distribution: RH9, SuSE 9.0, Slackware 10, Mandrake 10, Debian woody & sarge, FC2-3, OpenBSD
Posts: 71

Rep: Reputation: 17
Ideas I have, answers maybe. Firstly, refer to the post before yours, from me. Forgive me for mentioning this but be sure you are not doing umount when you are "in" the directory where the export is mounted. Secondly, as I mentioned in that post, you can simply restart the nfs service; you don't have to reboot the computer. It seems that I've sometimes needed to restart the service on both server and client, and the order in which this is done may be important. I hope this helps.
 
Old 08-13-2005, 10:51 PM   #5
thrombomodulin
LQ Newbie
 
Registered: Dec 2003
Location: MI, USA
Distribution: FC 2
Posts: 14

Rep: Reputation: 0
nfs server reboot

Thanks for your reply. We've tried this ready: both restarting NFS and, of course, the umount command was not executed from the mounted directory.

Even if restarting the NFS server worked, it would be an undesireable solution as it may cause problems with other mounted directories on the same server.

Best Regards,

Thromb,
 
Old 08-13-2005, 11:14 PM   #6
eflester
Member
 
Registered: Sep 2003
Location: Washington
Distribution: RH9, SuSE 9.0, Slackware 10, Mandrake 10, Debian woody & sarge, FC2-3, OpenBSD
Posts: 71

Rep: Reputation: 17
I see.

Well, let me dump the rest of my experience with NFS here. It's not much, but it might help.

I once had a really strange problem with an NFS mount that would only happen sometimes, and when it happened the only thing that seemed to fix it was that undesirable of undesirables, the reboot. It's a long story, but I won't bore you with all of it. Just what I discovered, and what fixed the strange behavior: a new NIC.

I know that doesn't seem likely, it didn't seem likely to me at the time, but I pursued that problem for about a year and when I changed the NIC in the client PC, no more strange NFS behavior.
Go figure.

Best of luck!
 
Old 08-28-2008, 07:29 AM   #7
kakubei
LQ Newbie
 
Registered: Apr 2004
Posts: 4

Rep: Reputation: 0
restart NFS service on the server

If nothing else works, you can try restarting the NFS service on the server. I know you stated this is not desirable because it could cause problems with the other mounts, especially if a client is writing data at the time of the restart.

HOWEVER, there should not be any problem with restarting the NFS service on the server and the other clients should not lose any data. The time it takes to restart the NFS service is quite negligible and you should be ok. We have had to do this sometimes on a production server and haven't had too many problems.

It is strange though that you cannot solve it using umount and then mount again. This might happen because there is an rpcd connection to stale NFS mounts in which case restarting the rpc daemons (whichever ones you are using, if Fedora-based, use "chkconfig --list |grep rpc" without the quotes, to find out what services have rpc in them) might do the trick.

Hope this helps.
 
Old 09-11-2009, 11:35 AM   #8
senyahnoj
Member
 
Registered: Jul 2004
Location: Gloucestershire, UK
Distribution: Ubuntu, Debian & Gentoo
Posts: 74

Rep: Reputation: 16
umount -f

I get this a lot with SVN working copies on an NFS share. The only thing I can get to work is detailed here:

http://www.cyberciti.biz/tips/nfs-st...-solution.html

i.e. umount the share with the -f option then mount it again
 
1 members found this post helpful.
Old 05-17-2012, 12:06 AM   #9
snaveen58
LQ Newbie
 
Registered: Nov 2011
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by BrianK View Post
I powered off my NFS file server without unmounting all the nfs clients first. Now that it's back on, my nfs clients get a "Stale nfs handle" on the nfs share. I can get it back by rebooting them all (the clients), but is there a way to get it working again without rebooting?

I tried unmounting & remounting the nfs share, but I can't unmount, I get "device is busy"

I also tried stopping portmap & nfs on the client & then restarting them. no luck.

ideas?

I know I can always reboot, but I'd rather not.

Thanks.
1> At server side in /etc/exports add FSID some number(0-65535) per NFS share.
2> Now remount all your NFS share at client.
3> Reboot NFS server and check out. All the shares will be accessible at client after successful reboot of NFS server.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stale NFS File handle after samba install Spyder~1 Linux - Newbie 7 04-08-2009 03:36 PM
stale NFS file handle error hardian_97 Linux - Networking 0 10-02-2005 11:09 PM
NFS stale file handle master Linux - Software 7 06-14-2005 10:49 AM
Stale NFS file handle toneys Linux - Networking 1 10-24-2004 03:36 PM
Stale NFS handle error sumanjay Slackware 0 08-04-2003 10:21 PM


All times are GMT -5. The time now is 07:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration