When monitoring NFS under VERITAS Cluster Server (VCS) the lockd process is not restarted if it dies.

Article:TECH8088  |  Created: 2000-01-11  |  Updated: 2002-01-01  |  Article URL http://www.symantec.com/docs/TECH8088
Article Type
Technical Solution

Product(s)

Environment

Issue



When monitoring NFS under VERITAS Cluster Server (VCS) the lockd process is not restarted if it dies.

Solution



The NFS agent starts /usr/lib/nfs/lockd when onlining, but does not monitor for it.

NOTE: The procedure in this TechNote creates a new agent (a copy of the Process agent) to monitor the lockd process, and restart it if necessary.  For more information on creating agents, see the VERITAS Cluster Server Agent Developer's Guide.  When following this procedure, it is important to use the exact same capitalization as in the examples.

To have VCS monitor the lockd process:

1.  Change into the VCS binary directory (do this on all systems).

#cd /opt/VRTSvcs/bin

2.  Make a copy of the Process directory, named Lockd (do this for all systems).

#cp -rp Process Lockd

3. Change the name of the ProcessAgent to LockdAgent

#mv /opt/VRTSvcs/bin/Lockd/ProcessAgent /opt/VRTSvcs/bin/Lockd/LockdAgent

4.  Make the configuration of your cluster read/write, if it isn't already.

#haconf -makerw

5.  Create a new resource type, named Lockd.

#hatype -add Lockd

6.  Add the PathName and Arguments attributes to the newly created agent.

# haattr -add Lockd PathName -scalar
# haattr -add Lockd Arguments -scalar

7.  Modify the RestartLimit attribute of the Lockd resource type to a number greater than 0.  This number will determine the number of attempts the agent will make before declaring the resource offline.

#hatype -modify Lockd RestartLimit 10

8.  Modify the Operations attribute of the Lockd resource type to OnOnly, so that it will never kill the lockd process, only start it, monitor it, and restart it if necessary.

#hatype -modify Lockd Operations OnOnly

9.  Modify the Arglist attribute of the Lockd resource type to "PathName Arguments".

#hatype -modify Lockd ArgList "PathName Arguments"

10.   Modify the LogLevel attribute of the Lockd Resource type to "Error".

#hatype -modify Lockd LogLevel error

11.  Modify the NameRule attribute of the Lockd resource type to "resource.PathName".

#hatype -modify Lockd NameRule resource.PathName

12. Create a resource of type Lockd to monitor (and restart if necessary) the lock process.  (Substitute the service group's name for GroupName, of course.)

#hares -add lockd_res Lockd <Group_Name>

VCS:10245:Resource added
NameRule and Enabled attributes must be set before agent monitors

13. Set the PathName attribute of the resource to the path name for lockd, which varies by platform.

    On Solaris:

    #hares -modify lockd_res PathName /usr/lib/nfs/lockd

    On HP-UX:

    #hares -modify lockd_res PathName /usr/sbin/rpc.lockd

14. Enable the new resource.

#hares -modify lockd_res Enabled 1

15. Make the share type resources dependant on the lockd_res as they are with the NFS type resource.

#hares -link <share type resource> lockd_res

16. Save the new configuration and return the cluster configuration to read-only

#haconf -dump -makero

There should now be a new resource type named Lockd and a new resource named lockd_res.  The existing share type resources should be dependant on the lockd_res.  With this configured,  if the /usr/lib/nfs/lockd process exits or is killed VCS will restart it.







Legacy ID



231012


Article URL http://www.symantec.com/docs/TECH8088


Terms of use for this information are found in Legal Notices