The Linux FailSafe application interface identifies resources by two strings:
Resource name
Resource type
For example, a resource named vol1 of resource type volumes is identified by the following: vol1 volumes.
Using the script library simplifies interaction with the interface. If you do not use the script library, you must understand the following file formats used by action scripts:
Input file, which contains the list of resources that must be acted on by the executable; each resource must be specified on a separate line in the file. SRMD can also pass action flags for each resource in the input file. The format of a line in the input file is as follows (fields separated by white space):
resource_name action_flags
Output file, in which the executable writes the return the status of the each resource on a separate line using the following format (fields separated by white space):
resource_name resource_status
(optional) Input parameters file, which contains the name of the cluster:
ClusterName clustername
The following codes are defined in /usr/lib/failsafe/common_scripts/scriptlib:
HA_SUCCESS
HA_NOT_RUNNING
HA_INVAL_ARGS
HA_CMD_FAILED
HA_RUNNING
HA_NOTSUPPORTED
HA_NOCFGINFO