Operating System - HP-UX
1824024 Members
4126 Online
109667 Solutions
New Discussion юеВ

bdf shows Stale NFS file handle...

 
Rafael Mendon├зa Braga
Regular Advisor

bdf shows Stale NFS file handle...

Hello Guys...

I have a HpUx 11i server that has a NFS mounted from a OpenVms server... Last Sunday, the OpenVms server was rebooted, and now, when I do a bdf at my HpUx, i got this message:

bdf: /interface/public: Stale NFS file handle

Somebody can give an advice on how to solve it without the needing of reboot my HpUx!?

Thanks in advance,

Rafael M. Braga

11 REPLIES 11
Steven E. Protter
Exalted Contributor

Re: bdf shows Stale NFS file handle...

umount /interface/public

mount it again

mount -a # if its in /etc/fstab

You may have processes open on the fs.

fuser -cuk /filesystemname

Will kill any processes that think they are open on this stale filesystem.

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
Mel Burslan
Honored Contributor

Re: bdf shows Stale NFS file handle...

I am under the impression that you already tried umount that nfs mounted volume and it failed. If not, try this first.

then try shutting down your nfs client and restarting it

/sbin/init.d/nfs.client stop
/sbin/init.d/nfs.client start

then

mount vmsserver:/filesystem /local_bdf_mountpoint

if this also doesn't work, unfortunately you have to reboot.

________________________________
UNIX because I majored in cryptology...
Rafael Mendon├зa Braga
Regular Advisor

Re: bdf shows Stale NFS file handle...

Thanks guys, but the problem still here!!!

I tried both , but in both cases I got errors...
The Filesystem is in the /etc/fstab so i did a mount -a. But I got this error:

nfs mount: get_fh: TAURUS.scania.se:/des29/aceite/int: No such file or directory

So I stopped the nfs.client but the stop command hangs.

Now, my nfs is not mounted... When I do a bdf the error doesn't appear, but i can't mount it anymore!!!


Any tips?

thanks,

Rafael M. Braga
Rafael Mendon├зa Braga
Regular Advisor

Re: bdf shows Stale NFS file handle...

Is it hanging or not?

root$ /sbin/init.d/nfs.client stop
killing nfsd
killing rpc.mountd
starting NFS SERVER networking

starting up the rpcbind daemon
rpcbind already started, using pid: 755
starting up the mount daemon
rpc.mountd already started, using pid: 15512
starting up the NFS daemons
nfsd(s) already started, using pid(s): 15523
starting up the Status Monitor daemon
rpc.statd already started, using pid: 802
starting up the Lock Manager daemon
rpc.lockd already started, using pid: 808


This is the screen where I am locked!
Bharat Katkar
Honored Contributor

Re: bdf shows Stale NFS file handle...

Hi Braga,
This normally happen if nfs server gets rebooted or not responding for any reason.

what i normally od is umount the filesystems and mount it again.

# umount /interface/public
# mount servername:filessystemname /interface/public

Hope that works.
Regards,
You need to know a lot to actually know how little you know
Senthil Kumar .A_1
Honored Contributor

Re: bdf shows Stale NFS file handle...


Check wether this helps...

Note: This section refers only to TCP NFS connections.

To check if your problem fits with the title of this section, verify network connectivity between NFS server and client and by running exportfs on the server side. Verify which NFS server filesystems are exported for which NFS clients. And check if the desired filesystem been exported to client is experiencing problems with stale mounts.

1) Execute the following command to obtain the IP address of the NFS server

nslookup NFS_server_hostname

2) Connect to the NFS client and execute the following command

netstat -an|grep 2049

2049 is port used by nfsd on NFS server. You can verify this by executing rpcinfo -p or grep nfs /etc/services on NFS server.

You will see lines like following:

Proto Recv-Q Send-Q Local Address Foreign Address (state)

tcp 0 0 143.26.128.95.1019 143.26.128.97.2049 CLOSE_WAIT

Find the line which contains the NFS server IP address followed by the 2049 in the `Foreign Address ` column, and confirm that this TCP connection is in CLOSE_WAIT state.

3) Convert `Local IP','Local Port','remote IP'and `Remote Port'to hexadecimal format. In this example it will be:

`Local IP'143.26.128.95 0x8f1a805f
`Local Port'1019 0x03fb
`Remote IP'143.26.128.97 0x0f1a8061
`Remote Port'2049 0x0801


4) Terminate the corresponding TCP connection using ndd command. The argument will be the 24 character strings that contains hexadecimal representation of `Local IP','Local Port','Remote IP'and `Remote Port'.


ndd -set /dev/tcp tcp_discon_by_addr `0x8f1a805f03fb0f1a80610801'

Regards

Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Steven E. Protter
Exalted Contributor

Re: bdf shows Stale NFS file handle...

You must restart nfs.client before you try and mount again.

/sbin/init.d/nfs.client start

I would possibly stop and start all the nfs systems.

nfs.core
nfs.server
nfs.client

They interact in ways that may surprise you.

The bottom line here however is you MAY have to boot your machine. The situation may have become more screwed up than can be fixed with solutions provided here.

There comes a point of diminishing returns where you should schedule some maintenance and boot.

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
Sudeesh
Respected Contributor

Re: bdf shows Stale NFS file handle...

Hi

nfs mount: get_fh: TAURUS.scania.se:/des29/aceite/int: No such file or directory

From the above message it look like the folder is no more exported from your nfs server. Verify this by following commands.

nslookup nfs_server_name
#to ensure the server name is resolved

/usr/sbin/showmount -e nfs_server_name
#This will list all nfs exported filesystem from nfs_server_name

If the server is not exporting the directory, edit the /etc/exports file on the server so that it allows your NFS client access to the directory. Then, issue the following command to force the server to read its /etc/exports file
/usr/sbin/exportfs -a.

Sudeesh
The most predictable thing in life is its unpredictability
Rafael Mendon├зa Braga
Regular Advisor

Re: bdf shows Stale NFS file handle...

Thanks everybody that are helping me!
During the night, we rebooted the server, but the error doesn't seems to disappear...

Look:
root@draco$ /sbin/init.d/nfs.client start
starting NFS CLIENT networking

killing nfsd
killing rpc.mountd
starting up the rpcbind
rpcbind already started, using pid: 744
starting up the BIO daemons
biod(s) already started, using pid(s): 768 769 770 771 772 773 774 775 3
starting up the Status Monitor daemon
rpc.statd already started, using pid: 791
starting up the Lock Manager daemon
rpc.lockd already started, using pid: 797
mounting remote NFS file systems ...
nfs mount: get_fh: TAURUS.scania.se:/des29/aceite/int: No such file or directory
FAILURE CODE: 1
Mount failed! Possible local filesystem mount.
If local filesystem, then nfs.server will mount it.

mounting CacheFS file systems ...
starting NFS SERVER networking

starting up the rpcbind daemon
rpcbind already started, using pid: 744
starting up the mount daemon
/usr/sbin/rpc.mountd
starting up the NFS daemons
/usr/sbin/nfsd 16
starting up the Status Monitor daemon
rpc.statd already started, using pid: 791
starting up the Lock Manager daemon
rpc.lockd already started, using pid: 797


Coul it be something wrong on the VMS side?

I don't know more waht to do!!!
Linda Card
Frequent Advisor

Re: bdf shows Stale NFS file handle...

Rafael,
I had the same problem last month on my recently reloaded 10.20 box.

mounting remote NFS file systems ...
nfs mount: get_fh: TAURUS.scania.se:/des29/aceite/int: No such file or directory
FAILURE CODE: 1
Mount failed! Possible local filesystem mount.
If local filesystem, then nfs.server will mount it.

Mine turned out to be that my default gateway was not specified in SAM. The ip address was in the /etc/hosts but SAM's
Networking & Comms - Internet Address - Actions - Modify Default Gateway said "None" and I couldn't remember if I had just forgotten to put the Default Gateway in SAM or if it hiccupped itself out. The networking stuff has to work in order for NFS to work. And yes, I had to reboot. Hope this helps.
Linda
Rafael Mendon├зa Braga
Regular Advisor

Re: bdf shows Stale NFS file handle...

Hello people!!

Another guy from our Unix team did it:

"/sbin/init.d/nfs.server start"

Now it's mounted!!

He told me that because the OS's are different, the NFS SERVER has to be started...
I checked too our "/etc/rc.config.d/nfsconf" and the variable NFS_SERVER was set to 0, what means NFS server wouldn't start on the reboot!!! Someone has changed it... Now I set it to 1!

Thanks everybody!!!