I have created an order constraint that requires a DRBD/iSCSI target
resource group to be up before an application resource groups comes up.
At startup the order is honored, and the resource groups come up in the
desired order.
In the event of a failover in the storage group I would like the
application groups to go offline while the storage group fails over to
another node, otherwise the applications will crash because they have
lost access to the storage.
The application resource groups do not stop while the storage group
recovers.
If two groups are created, call them resource1 and resource2, and then
an order constraint is created where resource1 before resource2, should
resource2 go offline during a failover of resource1? In my test setup
they do not.
This is a 5 node non-symmetrical cluster with the storage resource group
constrained to 2 nodes and the application resource group running on 2
nodes, with the 5th node being the failover target for the other 2
application nodes.
Here are the constraints;
<rsc_order from="iscsi_resources" type="before" to="vg8_resources"
id="vg8_after_iscsi"/>
<rsc_order from="iscsi_resources" type="before" to="vg9_resources"
id="vg9_after_iscsi"/>
And here is the entire cib.xml;
<cib admin_epoch="0" have_quorum="true" ignore_dtd="false"
num_peers="5" cib_feature_revision="1.3" generated="true"
ccm_transition="23" dc_uuid="38f1765f-803f-44e9-99e0-6a942d26a5fd"
epoch="825" num_updates="1" cib-last-written="Thu Dec 13 20:55:18 2007">
<configuration>
<crm_config>
<cluster_property_set id="cib-bootstrap-options">
<attributes>
<nvpair name="last-lrm-refresh"
id="cib-bootstrap-options-last-lrm-refresh" value="1197604512"/>
<nvpair id="cib-bootstrap-options-symmetric-cluster"
name="symmetric-cluster" value="False"/>
</attributes>
</cluster_property_set>
</crm_config>
<nodes>
<node uname="n1c1.mycluster.net" type="normal"
id="92d6f310-fac2-4274-98c0-b6c9c9498763">
<instance_attributes
id="nodes-92d6f310-fac2-4274-98c0-b6c9c9498763">
<attributes>
<nvpair name="standby"
id="standby-92d6f310-fac2-4274-98c0-b6c9c9498763" value="off"/>
</attributes>
</instance_attributes>
</node>
<node uname="n3c1.mycluster.net" type="normal"
id="38f1765f-803f-44e9-99e0-6a942d26a5fd">
<instance_attributes
id="nodes-38f1765f-803f-44e9-99e0-6a942d26a5fd">
<attributes>
<nvpair name="standby"
id="standby-38f1765f-803f-44e9-99e0-6a942d26a5fd" value="off"/>
</attributes>
</instance_attributes>
</node>
<node uname="n2c1.mycluster.net" type="normal"
id="c7829c9c-d3e5-44fe-8223-e1b43407c107">
<instance_attributes
id="nodes-c7829c9c-d3e5-44fe-8223-e1b43407c107">
<attributes>
<nvpair name="standby"
id="standby-c7829c9c-d3e5-44fe-8223-e1b43407c107" value="off"/>
</attributes>
</instance_attributes>
</node>
<node id="e86cf6a1-4aa1-4c81-962e-46219fb66d1a"
uname="n4c1.mycluster.net" type="normal"/>
<node id="dde4ae8e-f471-454b-9331-717944003b1b"
uname="n5c1.mycluster.net" type="normal"/>
</nodes>
<resources>
<group ordered="true" collocated="true" id="iscsi_resources">
<primitive class="heartbeat" type="drbddisk"
provider="heartbeat" id="drbd0">
<instance_attributes id="drbd0_instance_attrs">
<attributes>
<nvpair name="target_role" id="drbd0_target_role"
value="started"/>
<nvpair id="3b6f10d5-4424-4f5d-9747-3b093367dba2"
name="1" value="drbd0"/>
</attributes>
</instance_attributes>
</primitive>
<primitive class="heartbeat" type="drbddisk"
provider="heartbeat" id="drbd1">
<instance_attributes id="drbd1_instance_attrs">
<attributes>
<nvpair name="target_role" id="drbd1_target_role"
value="started"/>
<nvpair id="f0174229-b82b-493a-8c2d-c75c901ff955"
name="1" value="drbd1"/>
</attributes>
</instance_attributes>
</primitive>
<primitive class="lsb" type="iscsi-target" provider="heartbeat"
id="iscsi_target">
<instance_attributes id="iscsi_target_instance_attrs">
<attributes>
<nvpair name="target_role" id="iscsi_target_target_role"
value="started"/>
</attributes>
</instance_attributes>
</primitive>
<primitive class="ocf" type="IPaddr" provider="heartbeat"
id="iscsi_ip">
<instance_attributes id="iscsi_ip_instance_attrs">
<attributes>
<nvpair name="target_role" id="iscsi_ip_target_role"
value="started"/>
<nvpair name="ip"
id="529fcbb9-ecc5-486c-805c-624629129b77" value="192.168.248.71"/>
</attributes>
</instance_attributes>
</primitive>
<instance_attributes id="iscsi_resources_instance_attrs">
<attributes>
<nvpair name="target_role" id="iscsi_resources_target_role"
value="started"/>
</attributes>
</instance_attributes>
</group>
<group ordered="true" collocated="true" id="vg8_resources">
<primitive class="ocf" type="IPaddr" provider="heartbeat"
id="vg8_ip">
<instance_attributes id="vg8_ip_instance_attrs">
<attributes>
<nvpair name="target_role" id="vg8_ip_target_role"
value="started"/>
<nvpair id="fafb7124-870b-44fa-a05b-3907be6de3fe"
name="ip" value="10.0.0.83"/>
</attributes>
</instance_attributes>
</primitive>
<primitive class="ocf" type="Filesystem" provider="heartbeat"
id="vg8_files">
<instance_attributes id="vg8_files_instance_attrs">
<attributes>
<nvpair name="target_role" id="vg8_files_target_role"
value="started"/>
<nvpair id="4497f810-c852-4ea3-b72c-087b28e6eb59"
name="fstype" value="ext3"/>
<nvpair id="043ee790-fb40-48d4-b487-4fcd9753d052"
name="device" value="-L drbd0"/>
<nvpair id="7edafe5d-ac64-4dfa-859e-94f19c4c0ef1"
name="directory" value="/mnt/asterisk"/>
</attributes>
</instance_attributes>
</primitive>
<instance_attributes id="vg8_resources_instance_attrs">
<attributes>
<nvpair name="target_role" id="vg8_resources_target_role"
value="started"/>
</attributes>
</instance_attributes>
</group>
<group ordered="true" collocated="true" id="vg9_resources">
<primitive class="ocf" type="IPaddr" provider="heartbeat"
id="vg9_ip">
<instance_attributes id="vg9_ip_instance_attrs">
<attributes>
<nvpair name="target_role" id="vg9_ip_target_role"
value="started"/>
<nvpair id="e2bdae0a-7ace-47e9-ab3d-17e3b2ad2e65"
name="ip" value="10.0.0.86"/>
</attributes>
</instance_attributes>
</primitive>
<primitive class="ocf" type="Filesystem" provider="heartbeat"
id="vg9_files">
<instance_attributes id="vg9_files_instance_attrs">
<attributes>
<nvpair name="target_role" id="vg9_files_target_role"
value="started"/>
<nvpair id="a5cee0e2-372b-45c6-8fce-49e399a82138"
name="fstype" value="ext3"/>
<nvpair id="bc99e1de-e87e-467f-80f1-86343a610a1f"
name="device" value="-L drbd1"/>
<nvpair id="238cc473-3683-46d7-9ba4-fe7ff2bbba46"
name="directory" value="/mnt/asterisk"/>
</attributes>
</instance_attributes>
</primitive>
<instance_attributes id="vg9_resources_instance_attrs">
<attributes>
<nvpair name="target_role" id="vg9_resources_target_role"
value="started"/>
</attributes>
</instance_attributes>
</group>
</resources>
<constraints>
<rsc_location id="iscsi_resources_n4c1" rsc="iscsi_resources">
<rule id="prefered_iscsi_resources_n4c1" score="50">
<expression attribute="#uname"
id="502b6382-23a3-45d0-a160-5e14b8ecfdc6" operation="eq"
value="n4c1.mycluster.net"/>
</rule>
</rsc_location>
<rsc_location id="iscsi_resources_n3c1" rsc="iscsi_resources">
<rule id="prefered_iscsi_resources_n3c1" score="100">
<expression attribute="#uname"
id="6f0e9b4e-cd00-4665-a6fc-a4d798f30e2c" operation="eq"
value="n3c1.mycluster.net"/>
</rule>
</rsc_location>
<rsc_location id="vg8_resources_n1c1" rsc="vg8_resources">
<rule id="prefered_vg8_resources_n1c1" score="100">
<expression attribute="#uname"
id="935a89a2-f8fd-4255-a310-9362f027c33e" operation="eq"
value="n1c1.mycluster.net"/>
</rule>
</rsc_location>
<rsc_location id="vg8_resources_n5c1" rsc="vg8_resources">
<rule id="prefered_vg8_resources_n5c1" score="50">
<expression attribute="#uname"
id="d6cae582-25cf-4544-8a86-08e74751be2e" operation="eq"
value="n5c1.mycluster.net"/>
</rule>
</rsc_location>
<rsc_location id="vg9_resources_n2c1" rsc="vg9_resources">
<rule id="prefered_vg9_resources_n2c1" score="100">
<expression attribute="#uname"
id="c33cd731-a938-4e37-96c1-288e54b0735b" operation="eq"
value="n2c1.mycluster.net"/>
</rule>
</rsc_location>
<rsc_location id="vg9_resources_n5c1" rsc="vg9_resources">
<rule id="prefered_vg9_resources_n5c1" score="50">
<expression attribute="#uname"
id="164e6bb1-f4a8-42f6-b673-25b8c3df07b4" operation="eq"
value="n5c1.mycluster.net"/>
</rule>
</rsc_location>
<rsc_colocation id="vg8_vg9" from="vg8_resources"
to="vg9_resources" score="-INFINITY"/>
<rsc_order from="iscsi_resources" type="before"
to="vg8_resources" id="vg8_after_iscsi"/>
<rsc_order from="iscsi_resources" type="before"
to="vg9_resources" id="vg9_after_iscsi"/>
</constraints>
</configuration>
</cib>
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems