1832978 Members
2896 Online
110048 Solutions
New Discussion

/var/statmon/sm.bak

 
SOLVED
Go to solution
brian_31
Super Advisor

/var/statmon/sm.bak

Hi Folks:

Please help me to understand why i should delete the sm.bak directory. We are having rpc timeouts and the reason may be that there are lot of hosts which are removed in the network and not updated by the dns (probably flowing out of the DHCL pool. HP wants us to remove the sm.bak directories. Can someone please explain in detail why the sm.bak directories should be removed? Or are there any scripts to do it.
Thanks
Brian
4 REPLIES 4
S.K. Chan
Honored Contributor
Solution

Re: /var/statmon/sm.bak

When NFS server rebooted (or rpc.lockd/statd killed & restarted) the statd daemon will go through a recovery process to try rebuild the queue of locks the server was managing.
The recovery process will do this :-
a) Server statd moves all files in /var/statmon/sm into /var/statmon/sm.bak
b) One at a time server statd will attempt to contact client statd whose hostname matches the name of the file in /var/statmon/sm.bak
c) If successful, the file is removed from /var/statmon/sm.bak
d) Statd on client will contact its local lockd and explain that the server crashes and the client must reclaim any locks it had with that server prior to the crash.

In a NFS locking issue/problem usually /var/statmon/sm and sm.bak have to be cleanup.

hope this helps ..
S.K. Chan
Honored Contributor

Re: /var/statmon/sm.bak

oops .. to answer yr q about the script ..
I usually do it manually (but you can put this i s script) ..
a)# kill -9 `ps -ef|grep rpc.lockd|grep -v grep|awk '{print $2}'`
b)==> do a) again for rpc.statd
c)# rm -R /var/statmon/sm.bak
# rm -R /var/statmon/state.bak
# mv /var/statmon/sm /var/statmon/sm.bak
# mv /var/statmon/state /var/statmon/state.bak
d)==> Restart rpc.statd and rpc.lockd
brian_31
Super Advisor

Re: /var/statmon/sm.bak

Hi Chan:

Thanks much for your suggestions. But i am running production servers here. If i blow up sm, sm.bak and state then should i reboot to build it again or just stop and start the statd and lockd services. Again should i do it on the client or the server?

Thanks
Brian
S.K. Chan
Honored Contributor

Re: /var/statmon/sm.bak

Hi Brian,
Do it on the server side and there's no need to reboot.

rgds