Managing HP Serviceguard A.11.20.10 for Linux, December 2012

For more information on using Serviceguard with VMware Virtual Machines, see the white paper
Using Serviceguard for Linux with VMware Virtual Machines at http://www.hp.com/go/
linux-serviceguard-docs.
CAUTION: Serviceguard makes and revokes registrations and reservations during normal package
startup and shutdown, or package failover. Serviceguard also provides a script to clear reservations
in the event of a catastrophic cluster failure. You need to make sure that this script is run in that
case; the LUN devices could become unusable otherwise. See “Revoking Persistent Reservations
after a Catastrophic Failure” (page 243) for more information.
3.7.2 How Persistent Reservations Work
You do not need to do any configuration to enable or activate PR, and in fact you cannot enable
it or disable it, either at the cluster or the package level; Serviceguard makes the decision for each
cluster and package on the basis of the Rules and Limitations described above.
When you run cmapplyconf (1m) to configure a new cluster, or add a new node, Serviceguard
sets the variable cluster_pr_mode to either pr_enabled or pr_disabled.
ENABLED means that packages can in principle use PR, but in practice will do so only if they
meet the conditions spelled out under “Rules and Limitations.
DISABLED means that no packages can use PR
You can see the setting of cluster_pr_mode in the output of cmviewcl -f line; for example:
...
cluster_pr_mode: pr_enabled
NOTE: You cannot change the setting of cluster_pr_mode.
If a package is qualified to use PR, Serviceguard automatically makes and revokes registrations
and reservations for the package's LUNs during package startup, and revokes them during package
shutdown, using the sg_persist command. This command is available, and has a manpage,
on both Red Hat 5, Red Hat 6, and SUSE 11 .
Serviceguard makes a PR of type Write Exclusive Registrants Only (WERO) on the package's LUN
devices. This gives read access to any initiator regardless of whether the initiator is registered or
not, but grants write access only to those initiators who are registered. (WERO is defined in the
SPC-3 standard.)
All initiators on each node running the package register with LUN devices using the same PR Key,
known as the node_pr_key. Each node in the cluster has a unique node_pr_key, which you
can see in the output of cmviewcl -f line; for example:
...
node:bla2|node_pr_key=10001
When a failover package starts up, any existing PR keys and reservations are cleared from the
underlying LUN devices first; then the node_pr_key of the node that the package is starting on
is registered with each LUN.
In the case of a multi-node package, the PR reservation is made for the underlying LUNs by the
first instance of the package, and the appropriate node_pr_key is registered each time the
package starts on a new node. If a node fails, the instances of the package running on other nodes
will remove the registrations of the failed node.
You can use cmgetpkgenv (1m) to see whether PR is enabled for a given package; for example:
cmgetpkgenv pkg1
...
PKG_PR_MODE="pr_enabled"
3.7 About Persistent Reservations 71