Novell SUSE LINUX ENTERPRISE SERVER 10 SP2 HEARTBEAT Manual page 61

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

Advertisement

5.3.1 Locational Constraints
This type of constraint may be added multiple times for each resource. All
rsc_location constraints are evaluated for a given resource. A simple example
that increases the probability to run a resource with the ID filesystem_1 on the
node with the name earth to 100 would be the following:
<rsc_location id="filesystem_1_location" rsc="filesystem_1">
<rule id="pref_filesystem_1" score="100">
<expression attribute="#uname" operation="eq" value="earth"/>
</rule>
</rsc_location>
To take effect, the rsc_location tag must define an rsc attribute. The content
of this attribute must be the ID of a resource of the cluster.
The score attribute is set by the rule tag depending on the following
expression, and is used as a priority to run a resource on a node. The scores
are calculated by rules (see
ScoreCalculation
Whether a rule really is activated, changing the score, depends on the evalu-
ation of an expression. Several different operations are defined and the special
attributes #uname and #id may be used in the comparison.
It is also possible to use another rule or a date_expression. For more infor-
mation, refer to crm.dtd, which is located at /usr/lib/heartbeat/crm
.dtd.
5.3.2 Colocational Constraints
The rsc_colocation constraint is used to define what resources should run on the
same or on different hosts. It is not possible to give a score other than INFINITY or
-INFINITY, defining resources to run together always or never to run together. For
example, to run the two resources with the IDs filesystem_resource and
nfs_group always on the same host, use the following constraint:
<rsc_colocation
id="nfs_on_filesystem"
to="filesystem_resource"
from="nfs_group"
score="INFINITY"/>
http://wiki.linux-ha.org/
for details.)
Manual Configuration of a Cluster
53

Advertisement

Table of Contents
loading

Table of Contents