1820292 Members
3261 Online
109622 Solutions
New Discussion юеВ

Stale NFS file handle

 
Abdullah_2
Advisor

Stale NFS file handle

Dear All,

when i'm doing a bdf a get this error
bdf: /u24/prod/app/comn/admin/out: Stale NFS file handle
i do the following :
# umount /u24/prod/app/comn/admin/out
it is work
then i'm trying to mount it again but i did not successed.
i try :
# sbin/init.d/nfs.server stop
NFS_SERVER not set to one in /etc/rc.config.d/nfsconf, exiting.

what I ahve to do ?
9 REPLIES 9
Massimo Bianchi
Honored Contributor

Re: Stale NFS file handle

Hi,
first of all, if your problem is with mounting, you should stop the nfs.client

If you want to start/stop the server, you have to set to 1 the appropriate variable in /etc/rc.config.d/nfsconf.


As for the error, usually it is caused by temporary network problem /bottleneck, you can try changing some mount parameters for the FS.

For a 11.0 i suggest

rsize=32768,wsize=32768

and to increase the number of nfs client process at least to 16 (in nfsconf).

Massimo
Abdullah_2
Advisor

Re: Stale NFS file handle

dear Massimo,

I allready do :
sbin/init.d/nfs.client stop
and
sbin/init.d/nfs.client start

then I try :
sbin/init.d/nfs.server stop
but it dose not work !


Regards
Steven E. Protter
Exalted Contributor

Re: Stale NFS file handle

You need to check the NFS server.

Most likely its been booted or the exported filesystem is offline.

log on to that server, check /etc/exports

exportfs -a

The server may need to be restored.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Massimo Bianchi
Honored Contributor

Re: Stale NFS file handle

Are you sure that you are using the nfs server ?

It is used for exporting fs, maybe it's not your case.

You can try cleaning the mnttab:

mv /etc/mnttab /etc/mnttab.old

mount -p

check also /etc/rmntab .


If nothing works:
/sbin/init.d/nfs.client stop
/sbin/init.d/nfs.core stop
mv /etc/mnttab /etc/mnttab.old
mount -p
rm /etc/rmntab
/sbin/init.d/nfs.core start
/sbin/init.d/nfs.client start

Massimo





Abdullah_2
Advisor

Re: Stale NFS file handle

dear Massimo,

I did the commands but i still a can not mount the file from another server ,
If i do it from sam it give me an error
" Permission denied "
even if a mount it by command it give me the same result !

what i have to do ?


kind regards
Zeev Schultz
Honored Contributor

Re: Stale NFS file handle

Hi
Assume its remote nfs server that doesn't respond.Can you see it in the network at all?
I'd check the following:
1)how do you mount it?automount/afs or /etc/fstab line?Get the NFS server name from there.
2)run rpcinfo , see that nfs service (port 2049) is responding (registered with rpcbind).If nfs is not in the rpcinfo list
- connect to the server (will do it anyway) and check nfsd / statd /lockd daemons.
3)run showmount see that it
shows the client AS IF it has something mounted from the server.In this case you can logon to the nfs server and check /var/statmon/
directory to see if there any files related to the client (I'd also check this directory on the client as well).

So far

Zeev
So computers don't think yet. At least not chess computers. - Seymour Cray
Massimo Bianchi
Honored Contributor

Re: Stale NFS file handle

Hi,
if you are running automounter, you will have a /tmp_mnt directory.


Stop all, remove this directory (rm -r /tmp_mnt)
This will be re-created automatically by autmount.

For the other server: check if you are exporting something:

exportfs

and, in case, export the FS. Look in the /etc/exports, it's the default location.

Massimo
Kevin O'Donovan
Regular Advisor

Re: Stale NFS file handle

Hi,

a stale nfs file handle is usually due to the server going down/restarted or being unavailable to the client.

So, it looks like when you try to remount the nfs is still unavailable. Sounds like you need to find out why the server/nfs mount is no longer available to the client.
- is the server running?
- is there network connectivity to the client, i.e. can you ping/telnet to the server from the client?
- if you can, run exportfs on the server and check it is still exporting the filesystem you want to mount, if you can't access the server try running 'mount -e ' which should show you want filesystems the server is exporting.
- so, if the server is running and is still exporting that filesystem it is fine, and you can look at the client to see if there's something wrong there.
- also, can other machines mount this filesystem? if so then its likely the client has the problem, or possibly the network.

One thing that looks funny, you're running nfs.server stop on a machine which isn't set to be the NFS server - if machine S is the server and C is the client, you should run this on S, chances are it won't work on C and shouldn't.

Hope that makes sense and is some help?
Kevin.
Pete Randall
Outstanding Contributor

Re: Stale NFS file handle

The reason it was stale in the first place is because the remote server that provides this file system is unavailable. You will not be able to mount it on this system until you correct the problem that caused the other to be unavailable.

This system is not the server, it is the client - that's why you can't stop nfs.server - it was never started, nor should it be.


Pete


Pete