Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stale filesystem mounts 2

Status
Not open for further replies.

prv3116

MIS
Mar 16, 2001
80
US
What is the best way to clear stale mounts.

HostA has a filesystem mounted to HostB, mounted from command line. HostA goes down and can't be accessed. HostB now has a stale mount. Can't umount it because it thinks it is in use. Tried fuser -k and it just returns without clearing the mount. Tried stopping NFS and tried removing /etc/state. df command hangs, as well as ls in /.

Beside reboot, what else can I do.

I am looking at using automount (don't need NIS though).
 
tlee,

Well firstly try:

fuser -kxuc /filesystem

Then try stopping the nfs subsystem:

stopsrc -g nfs

and repeat the above command.

If all else fails use the lsof utility from Bulls web site - list open files - this should help you to identify which process is keeping the filesystem from unmounting.

Cheers

PSD
HACMP specialist
 
You must to clear the locks maintained by lockd on both sides!
I hope it works...
Unix was made by and for smart people.
 
Thanks for the input. I will have an opportunity later this week to test some of this on a couple of servers.

PSD
On the fuser -kxuc, I had tried the -k alone with no help, I'll try the -kxuc when I test later this week.

ElgisRamon
On clearing the lockd. I did stop/start nfs daemons and I removed the state file, but I think I may have gotten my sequence out of order on doing that. I was reading some IBM info on the NFS daemons (specifically the lockd) after getting your response. I don't believe I stopped nfs, removed state, then started nfs, in that order. I'll try that also. As far as doing this on "both sides". The exporting host was down completely.


 
You may need to do the following also:

lssrc -g nfs (to see if the nfs daemon is running)
or you can stop them all with stopsrc -g nfs
stopsrc -s lockd
stopsrc -s statd
stopsrc -s portmap
stopsrc -s rpc.statd
stopsrc -s rpc.lockd
stopsrc -g nfs
stopsrc -g tcpip
cd /etc
rm state
cd /etc/sm (remove everything in this subdirectory)
cd /etc/sm.bak/ (remove everything in this directory)
Then do a startsrc -s portmap
startsrc -s rpc.statd
startsrc -s lockd
startsrc -s rpc.lockd
startsrc -g nfs
startsrc -g tcpip
or you can start them all with starsrc -g nfs....but check
to be sure they are up.
you might get errors that it is already running, that is ok. Do a lssrc -g nfs and lssrc -g tcpip and see that they are all up

You said you were also running the automountd daemon, I
believe... And there were tons of patches at 4.3.3 for the
automount which I would look into...I don't remember them
all some were IY07994, IY07205, IY06748, IY06698
 
AIXQueen, this looks very familiar. I used to have to do this some years ago when supporting CATIA on 43p workstations. This is what I was trying to remember to do earlier but couldn't recall all the steps nor find the right online documentation. It DOES have to be in this specific sequence. I will try it in this later. Thanks.
 
TWO last things on the automount issue and starting daemons...
Issue the mount command
get the pid....then
you should really kill from smit... smit rmautomnt never a kill -9 or you will
never be able to unmount it....you can do just a kill pid but never kill -9
then you may have to manually unmount them or do a system rebooted.. if the
mount is busy and you cannot find the process to kill like PSD said.....

The important thing above is that portmap has to start before the nfs daemons. I got
the list above from old records...but portmap is the first one to be started...if you
can.
Good Luck
#-)
 
Yesterday i did a "umount -f yourmountpoint" and it works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top