Managing HP Serviceguard for Linux, Tenth Edition, September 2012

generic_resource_name sfm_disk
generic_resource_evaluation_type during_package_start
NOTE: Generic resources must be configured to use the monitoring script. It is the
monitoring script that contains the logic to monitor the resource and set the status
of a generic resource accordingly by using cmsetresource(1m).
These scripts must be written by the end-users according to their requirements. The
monitoring script must be configured as a service in the package if the monitoring
of the resource is required to be started and stopped as a part of the package.
This can be achieved by configuring a service_name and a service_cmd, by
providing the full path name of the monitoring script as the service_cmd value
as shown above. The service_name and generic_resource_name need not
be the same. However, it would be a good practice to do it, so that it would be
easier to identify the monitor.
HP provides a template and sample scripts as an example of how a monitoring
script can be written. For more information on monitoring scripts and a template,
see “Monitoring Script for Generic Resources” (page 340) and “Template of a
Monitoring Script” (page 343).
If the generic_resource_up_criteria is specified, the given resource is
considered to be an extended generic resource, else it is a simple generic resource.
For the description of generic resources parameters, see “Package Parameter
Explanations” (page 205). See “Using the Generic Resources Monitoring Service
(page 55).
3. After editing the package configuration file, verify the content of the package
configuration file:
cmcheckconf -v -P $SGCONF/pkg1/pkg1.conf
cmcheckconf: Verification completed with no errors found.
Use the cmapplyconf command to apply the configuration
4. When verification has completed without errors, apply the package configuration
file. This adds the package configuration information (along with generic resources)
to the binary cluster configuration file in the $SGCONF directory (usually
/etc/cmcluster directory) and distributes it to all the cluster nodes.
cmapplyconf -P $SGCONF/pkg1/pkg1.conf
Modify the package configuration ([y]/n)? y
Completed the cluster update
5. Verify that the generic resources parameters are configured.
cmviewcl -v -p pkg1
UNOWNED_PACKAGES
PACKAGE STATUS STATE AUTO_RUN NODE
Package Configuration Planning 127