Operating System - HP-UX
1820080 Members
3401 Online
109608 Solutions
New Discussion юеВ

How to tell which systems are mounting NFS exports

 
Andrew Kaplan
Super Advisor

How to tell which systems are mounting NFS exports

Hi there --

I want to unmount an NFS export but I am unable to do so because the mount is busy. What command(s) can I use to determine what client systems are currently mounting the export in question? Thanks.
A Journey In The Quest Of Knowledge
8 REPLIES 8
piyush mathiya
Trusted Contributor

Re: How to tell which systems are mounting NFS exports

You can use "showmount -e" command to check...

also you can use "fuse -cu " command to check if it is used by any local process...

Regards,
Piyush Mathiya
sujit kumar singh
Honored Contributor

Re: How to tell which systems are mounting NFS exports

hi

the command would be


showmount -a

this would show the clients that have mounted the servers exported fileystems.


regards
sujit
Andrew Kaplan
Super Advisor

Re: How to tell which systems are mounting NFS exports

Hi there --

Thank-you for your reply. The showmount command does help. What I am looking for is what systems currently have the export in question mounted. Also, if necessary, is there a way to force the mount in question to be unmounted? Thanks.

A Journey In The Quest Of Knowledge
sujit kumar singh
Honored Contributor

Re: How to tell which systems are mounting NFS exports

suppose your server has exported /home/test

you can use
fuser -cu /home/test -- to know what processes are accessing that file system.

then after that

fuser -kcu /home/test

to kill all the processes that are using thast filesystem.
Cuation: that fuser -kcu would terminate all the proceses as well as the user processes that are accessing that fileysten at that time.
regards
Viktor Balogh
Honored Contributor

Re: How to tell which systems are mounting NFS exports

>What I am looking for is what systems currently have the export in question mounted

# showmount -a SERVER

man 1m showmount:
"-a Print all remote mounts in the format"

****
Unix operates with beer.
Sagar Sirdesai
Trusted Contributor

Re: How to tell which systems are mounting NFS exports

Hi,
Just an addition I miss all the time is to unshare a NFS share before umounting it.

Sagar
Javed Khan_1
Valued Contributor

Re: How to tell which systems are mounting NFS exports

Hi,

look at the content of /etc/rmtab and see who all currently have nfs export mounted on them.

Unmount the export from all clients , this is to ensure none of the client goes to nfs stale condition if you unmount nfs export.

Once done do

stop nfs server on nfs master

unmount -- if still doesn't work do fuser -ku on mount point -- umount

Javed
Never Give Up
rariasn
Honored Contributor

Re: How to tell which systems are mounting NFS exports

Hi,

cat /etc/rmtab|grep -v "#"

rgs