You use the Resource Management API (RMAPI) to implement a resource type. The key elements of a resource type are the callback methods, programs invoked by the RGM to control resources on the cluster. The API defines the arguments and return value of the callback methods.
The only required callback methods for a resource type are a start method, START or PRENET_START, and a stop method, STOP or POSTNET_STOP.
The RMAPI provides callback methods in the following categories:
Control and initialization methods
START and STOP start and stop resources in a group that is being brought online or offline.
INIT, FINI, BOOT execute initialization and termination code on resources.
Administrative support methods
VALIDATE verifies properties set by administrative action.
UPDATE updates the property settings of an online resource.
Net-relative methods
PRENET_START and POSTNET_STOP do special startup or shutdown actions before network addresses in the same resource group are configured up or after they are configured down.
Monitor control methods
MONITOR_START and MONITOR_STOP start or stop the monitor for a resource.
MONITOR_CHECK assesses the reliability of a node before a resource group is moved to the node.
See Chapter 4, Resource Management API Reference and the rt_callbacks(1HA) man page for more information on the callback methods. Also see Chapter 5, Sample Application for examples of how the callback methods are used.