Novell SUSE LINUX ENTERPRISE SERVER 10 SP2 HEARTBEAT Manual page 62

Hide thumbs Also See for SUSE LINUX ENTERPRISE SERVER 10 SP2 HEARTBEAT:
Table of Contents

Advertisement

For a master slave configuration, it is necessary to know if the current node is a master
in addition to running the resource locally. This can be checked with an additional
to_role or from_role attribute.
5.3.3 Ordering Constraints
Sometimes it is necessary to provide an order in which services must start. For example,
you cannot mount a file system before the device is available to a system. Ordering
constraints can be used to start or stop a service right before or after a different resource
meets a special condition, such as being started, stopped, or promoted to master. An
ordering constraint looks like the following:
<rsc_order id="nfs_after_filesystem" from="group_nfs" action="start"
With type="after", the action of the from resource is done after the action of
the to resource.
5.3.4 Constraints for the Example
The example used for this chapter is quite useless without additional constraints. It is
essential that all resources run on the same machine as the master of the drbd resource.
Another thing that is critical is that the drbd resource must be master before any other
resource starts. Trying to mount the drbd device when drbd is not master simply fails.
The constraints that must be fulfilled look like the following:
• The file system must always be on the same node as the master of the drbd resource.
<rsc_colocation id="filesystem_on_master" to="drbd_resource"
• The file system must be mounted on a node after the drbd resource is promoted to
master on this node.
<rsc_order id="drbd_first" from="filesystem_resource" action="start"
54
Heartbeat
to="filesystem_resource" to_action="start" type="after"/>
Configuration
to_role="master" from="filesystem_resource" score="INFINITY"/>
to="drbd_resource" to_action="promote" type="after"/>

Advertisement

Table of Contents
loading

Table of Contents