Managing HP Serviceguard for Linux, Tenth Edition, September 2012
• You must not group two different high availability applications, services, or data,
whose control needs to be transferred independently, on the same volume group.
• Your root disk must not belong to a volume group that can be activated on another
node.
Using Generic Resources to Monitor Volume Groups
You can monitor a particular disk that is a part of an LVM volume group used by
packages.
You can do this by using the disk monitor capabilities of the System Fault Management,
available as a separate product, and integrating it in Serviceguard by configuring generic
resources in packages.
Monitoring can be set up to trigger a package failover or to report disk failure events to
Serviceguard by writing monitoring scripts, which can be configured as a service in a
package, as shown in the example that follows:
Consider a physical volume /dev/dsk/c5t0d1 that is a part of the volume group
vg_dd0 configured in a package pkg1. Your package configuration file (snippet) will
look like this:
package_name pkg1
vg vg_dd0
service_name sfm_disk_monitor
service_cmd $SGCONF/pkg1/sample_generic_resource_disk_monitor.sh
generic_resource_name sfm_disk
generic_resource_evaluation_type during_package_start
The example above will monitor the health of the disk /dev/dsk/c5t0d1 in the volume
group vg_dd0. The monitoring script gets the status of the disk (cmgetresource(1m))
via System Fault Management and sets the status of the disk using cmsetresource(1m).
If the sfm_disk fails for some reason as reported by SFM, then the monitoring script
will set the status of the resource to 'down' causing the package to fail.
NOTE: Specifying the generic_resource_evaluation_type is optional. If not
specified, the default value is during_package_start.
For more information, see:
• System Fault Management documents at http://www.hp.com/go/
hpux-diagnostics-sfm-docs
• “Using the Generic Resources Monitoring Service” (page 55)
• “Monitoring Script for Generic Resources” (page 340)
• “Getting and Setting the Status/Value of a Simple/Extended Generic Resource”
(page 128) and the manpages
98 Planning and Documenting an HA Cluster