Operating System - HP-UX
1823219 Members
3633 Online
109648 Solutions
New Discussion юеВ

Re: Stale NFS file handle

 
Sanjiv Sharma_1
Honored Contributor

Stale NFS file handle

Hi,

I am getting "Stale NFS file handle" message when I run "bdf" on my K360 server with hpux 10.20.

# bdf
bdf: /tmp_mnt.hpxt/mercury/hpxtfd: Stale NFS file handle
bdf: /tmp_mnt.hpxt/venus/hpxtfd: Stale NFS file handle

The mercury and the venus server no longer exists.

What needs to be done to remove these entry from the bdf output? I have rebooted the server once but it didn't helped.

Thanks,
Raje.
Everything is possible
20 REPLIES 20
U.SivaKumar_2
Honored Contributor

Re: Stale NFS file handle

Hi,
First step
#/sbin/init.d/nfs.client stop
( it is enough , if you kill only rpc.statd daemon )
Then
#cd /var/statmon/sm.bak
#rm -rf *
#cd /var/statmon/sm
#rm -rf *
#/sbin/init.d/nfs.client start
Try bdf again , now there will be no error messages.

regards,
U.SivaKumar

Innovations are made when conventions are broken
RikTytgat
Honored Contributor

Re: Stale NFS file handle

Hi,

You might also have to remove the corresponding lines from your /etc/fstab to avoid the error after a reboot!

Bye,
Rik

Sanjiv Sharma_1
Honored Contributor

Re: Stale NFS file handle

Hi,
Thanks for your reply.

I have tried this but it didn't help.
Also I have checked there were/are no files under /var/statmon/sm and /var/statmon/sm.bak.

I have also removed all the corresponding entry for mercury and venus from /etc/fstab, /etc/mnttab, /etc/rmtab.

Everything is possible
Paula J Frazer-Campbell
Honored Contributor

Re: Stale NFS file handle

Hi

Have you rebooted since you removed the entries from fstab ?

Meanwhile bdf -l will just show local file systems.

Paula
If you can spell SysAdmin then you is one - anon
Sanjiv Sharma_1
Honored Contributor

Re: Stale NFS file handle

Hi Paul,

Yes. I have rebooted the server after removing the entry from /etc/fstab.

But still it is showing Stale NFS file handle.
Everything is possible
U.SivaKumar_2
Honored Contributor

Re: Stale NFS file handle

Hi,
Try killing automount daemon. And do a
#fuser -ku /tmp_mnt

regards,
U.SivaKumar
Innovations are made when conventions are broken
RikTytgat
Honored Contributor

Re: Stale NFS file handle

Hi,

Just an idea, but is this directory configured for the automounter daemon?

Bye,
Rik
Sanjiv Sharma_1
Honored Contributor

Re: Stale NFS file handle

Hi Siva,

I have killed the automount daemon.
# fuser -ku /tmp_mnt.hpxt/mercury/hpxtfd

# umount /tmp_mnt.hpxt/mercury/hpxtfd
umount: /tmp_mnt.hpxt/mercury/hpxtfd: Stale NFS file handle.

No this directory is not configured for automounter.

The entry in /etc/auto_master is :
/net -hosts -soft

Everything is possible
Edgar Matzinger
Advisor

Re: Stale NFS file handle

Hi Raje,

is there, by any change, an entry in the configuration file to mount a floppy mounted inside an Xterminal? Re-use of ip addresses (probably not)? AFAICT, the mercury and venus hostnames you mention are Xterminal names. I'm just wondering if there is some resident data /opt/hpxt/enware/lbin/mountfloppy is using to mount the floppies from venus and mercury.

My $0.02, cu l8r, Edgar.
Sanjiv Sharma_1
Honored Contributor

Re: Stale NFS file handle

Hi,

I would like to know from which file/files does "mount -v" reads the information. As I can see the information of mercury and venus in it.

Also I forgot to mention that after rebooting the server the "Stale NFS file handle" was not there. I thought the problem has been resolved. I didn't run the bdf after that and hence couldn't know the status. Yesterday when I run the bdf it showed me the error.

I can't shutdown the server again as it is linked with production and hence I want to resolve this online.



Everything is possible
Animesh Chakraborty
Honored Contributor

Re: Stale NFS file handle

Hi,
Reboot will help but in your case it is automounter that is creating problem.
Remove entry from /etc/auto.direct file.


Did you take a backup?
Sanjiv Sharma_1
Honored Contributor

Re: Stale NFS file handle

Hi Animesh,

There is no /etc/auto.direct in the system.
Yes. I too believe that the reboot will help but last time the reboot has helped temporarily.
Everything is possible
John Carr_2
Honored Contributor

Re: Stale NFS file handle

Hi raje

since you have covered most of the operating system files and have had a period of time without problem can I suggest that maybe you have a shell script or an application with a hard coded mount which is failing.

just a thought
John.
Bill Hassell
Honored Contributor

Re: Stale NFS file handle

If you don't need any NFS mountpoints, run the scripts:

/sbin/init.d/nfs.client stop
/sbin/init.d/nfs.server stop
/sbin/init.d/nfs.core

Then edit the file:

/etc/rc.config.d/nfsconf

and set all these values to 0:


NFS_CLIENT=0
NFS_SERVER=0
AUTOMOUNT=0
START_MOUNTD=0

Next time you reboot, there will be no NFS services started. As mentioned, look in /etc/fstab for nfs and remove or comment those entries, and also look in /sbin/init.d for the name of the mountpoint or the name(s) of the remote system(s). If the mountpoint is not in fstab, then there must be an explicit mount command somewhere in startup. Also, remove the actual directory that the mountpoint uses to further aid in locating the 'lost' mount command.

NFS on production systems, as you've seen, is not very stable. Essentially, your production system is critcally dependent on the NFS servers as well as the network to these servers to always be up and running.


Bill Hassell, sysadmin
Sachin Patel
Honored Contributor

Re: Stale NFS file handle

Hi Raje,

I have same problm and I fix it using lsof and umount.

Check this thread
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x898b107d277ad611abdb0090277a778c,00.html

Sachin
Is photography a hobby or another way to spend $
Sanjiv Sharma_1
Honored Contributor

Re: Stale NFS file handle

Hi Sachin,
I don't find lsof command in /usr/local/bin.

Can you tell me from where can I get this?

Also I do require NFS mount as there are some more NFS entry in /etc/fstab and they are being used.
Everything is possible
steven Burgess_2
Honored Contributor

Re: Stale NFS file handle

Hi Raje

lsof can be downloaded from

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.61/


Here are its uses


To see all open files of a paricular process (via its pid):

# lsof -p

To see all open files associated with a command:

# lsof -c cron

...or by a logon name:

# lsof -u
# lsof -u

...or what process is using a TCP socket:

# lsof -i tcp:161
# lsof -i udp:161

Hope this helps

Steve
take your time and think things through
Sanjiv Sharma_1
Honored Contributor

Re: Stale NFS file handle

Hi Steve,
I have downloaded the lsof but still not able to umount the "Stale NFS file handle" directory.

I will reboot server and closely observe this time.

Thanks,
Everything is possible
steven Burgess_2
Honored Contributor

Re: Stale NFS file handle

Raje

How did you get on ?

Steve
take your time and think things through