Operating System - HP-UX
1826443 Members
3764 Online
109692 Solutions
New Discussion

Umount a NFS file system...

 
SOLVED
Go to solution
Jonathan Caplette_1
Super Advisor

Umount a NFS file system...

Hi guys,

I need to umount a NFS filesystem on ServerB. ServerB have mounted a NFS share from ServerA. My ServerA have been shutdown and returned to HP. I forgot to umount the NFS filesystem on ServerB. The thing is now I can't umount it. It says to me :nfs umount: nfs_umount: /hydr : is busy.

I tried "fuser -c /hydr" and I got this error: NFS server not responding still trying. That's normal cause it doesn't exist anymore...

How can I umount a that NFS filesystem??? Without rebooting the server...

Thanks
Jonathan
11 REPLIES 11
Steven E. Protter
Exalted Contributor
Solution

Re: Umount a NFS file system...

The NFS server is not responding. Sometimes the only way to clear this up is to boot the client.

You might try /sbin/init.d/nfs.client stop

It might fail.

You might have better luck running exportfs -av on the NFS server, assuming its Unix.

This problem can also be caused by networking problems, bad cables, inability to ping, subnet changes and firewalls between SErver A and Server B

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
Pete Randall
Outstanding Contributor

Re: Umount a NFS file system...

Jonathan,

In my experience, it's been very rare that I've successfully unmounted in this sort of situation. There ought to be a "-f" switch to the umount command to force it, but there isn't. The only thing you can do is reboot ServerB or bring up another ServerA to temporarily supply the file system in question.


Pete

Pete
Jeff Schussele
Honored Contributor

Re: Umount a NFS file system...

Hi Jonathan,

It's hard to do once the NFS server has gone down. You can try to stop the NFS client on this box
/sbin/init.d/nfs.cliebt stop
but I doubt that will do it.

Surest way is to get the server back up & on-line & then you can umount on the client.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Helen French
Honored Contributor

Re: Umount a NFS file system...

If you can share that file system again frim Server A, that would be best. You can then safely umount the file system.

Otherwise, you may need to reboot the system. Apply the latest NFS patches next time, it might resolve some of these issues.
Life is a promise, fulfill it!
John Carr_2
Honored Contributor

Re: Umount a NFS file system...

I dont think you can do anything with a stale NFS mount without the other server.
Geoff Wild
Honored Contributor

Re: Umount a NFS file system...

Try stopping all NFS services:

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

If it doesn't work - reboot.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Marco Santerre
Honored Contributor

Re: Umount a NFS file system...

My experience in this kind of situation is very similar to everything that has been mentionned already.

1- Try stopping all NFS services on your client.
2- I've also, just for the sake of clearing the problem, rebooted the ServerA just to get the NFS mountpoint up and running again, only to unmount it prior to shutting down the ServerA again.
3- Reboot ServerB
Cooperation is doing with a smile what you have to do anyhow.
Sascha Krueger
Occasional Advisor

Re: Umount a NFS file system...

you can use an option when mounting (or in fstab) nfs file systems called INT.this options lets you kill those stale mounts with some special signals. (don´t remember them now, but you should find them in the man-pages. it is not -9 or -15).another interesting option is SOFT, HARD. this controls whether the systems keeps trying to mount the nfs filesystem or if it shall stop after doing three unsuccesful trie
Unix - Administration
Elmar P. Kolkman
Honored Contributor

Re: Umount a NFS file system...

Though not the nicest way, and I haven't tried it, it should work:
1) add serverA's IP address to an existing server running NFS server
2) export the filesystem that was mounted
3) unmount on serverB (it can now reach the NFS server, though it is another server...
4) unexport the filesystem
5) remove the IP alias

You could even do all steps on serverB if you want...
Every problem has at least one solution. Only some solutions are harder to find.
Robert-Jan Goossens
Honored Contributor

Re: Umount a NFS file system...

Mark Grant
Honored Contributor

Re: Umount a NFS file system...

Might be worth doing soft NFS mounts in the future. It's just a mount option and should time out a broken NFS mount.

It is worth pointing out that an NFS mount should timeout anyway, it might take a few days but it is supposed to.
Never preceed any demonstration with anything more predictive than "watch this"