Greetings together,
I have now a two node cluster (heartbeat 2.1.2 + drbd 8).
I will run on the cluster:
ipaddr
drbd
filesystem (for mounting drbd)
apache
tomcat
I build a cib.xml for all of these with two collocations (one for drbd +
filesystem, second for apache tomcat).
I want that all resources run always on the same node and I must take
care, that the order - you see above - will be used.
Can you give me some hints, what else I had to add (collocations and
order?) to the cib.xml
Thanks and greetings
Jochen
--
Dr. rer. nat. Jochen Lienhard
UB Universität Freiburg
Dezernat EDV
Projekt AAR
Tel: (0761) 203-3908
Email: [EMAIL PROTECTED]
<cib admin_epoch="0" have_quorum="true" num_peers="2" cib_feature_revision="1.3" generated="true" ignore_dtd="false" epoch="211" num_updates="1" cib-last-written="Thu Jan 17 11:48:22 2008" ccm_transition="4" dc_uuid="20eedd6b-8fd8-4b93-9bc1-e359721a2123">
<configuration>
<crm_config>
<cluster_property_set id="cib-bootstrap-options">
<attributes>
<nvpair name="last-lrm-refresh" id="cib-bootstrap-options-last-lrm-refresh" value="1200564678"/>
<nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="2.1.2-node: b42542bc75cb615fbf1c9674085f8c73f14145ca"/>
</attributes>
</cluster_property_set>
</crm_config>
<nodes>
<node id="20eedd6b-8fd8-4b93-9bc1-e359721a2123" uname="mylogin2" type="normal"/>
<node id="11b5e2cf-f990-43e3-99b8-b8e2d52097f2" uname="mylogin1" type="normal"/>
</nodes>
<resources>
<primitive class="ocf" type="IPaddr2" provider="heartbeat" id="ipaddr">
<operations>
<op id="1" interval="5s" name="monitor" timeout="5s"/>
</operations>
<instance_attributes id="ipaddr_instance_attrs">
<attributes>
<nvpair id="f2b48548-edd8-481b-88e4-974d615dc8c0" name="ip" value="132.230.25.233"/>
</attributes>
</instance_attributes>
<meta_attributes id="ipaddr_meta_attrs">
<attributes>
<nvpair id="ipaddr_metaattr_target_role" name="target_role" value="started"/>
</attributes>
</meta_attributes>
</primitive>
<master_slave notify="true" globally_unique="false" id="pg-drbd">
<meta_attributes id="pg-drbd_meta_attrs">
<attributes>
<nvpair id="pg-drbd_metaattr_clone_max" name="clone_max" value="2"/>
<nvpair id="pg-drbd_metaattr_clone_node_max" name="clone_node_max" value="1"/>
<nvpair id="pg-drbd_metaattr_master_max" name="master_max" value="1"/>
<nvpair id="pg-drbd_metaattr_master_node_max" name="master_node_max" value="1"/>
<nvpair id="pg-drbd_metaattr_notify" name="notify" value="true"/>
<nvpair id="pg-drbd_metaattr_globally_unique" name="globally_unique" value="false"/>
<nvpair id="pg-drbd_metaattr_target_role" name="target_role" value="started"/>
</attributes>
</meta_attributes>
<primitive id="drbd" class="ocf" type="drbd" provider="heartbeat">
<instance_attributes id="drbd_instance_attrs">
<attributes>
<nvpair id="6c40b786-e7a8-4e1a-9aa0-466d3162cf04" name="drbd_resource" value="drbd0"/>
</attributes>
</instance_attributes>
</primitive>
</master_slave>
<primitive id="Filesystem" class="ocf" type="Filesystem" provider="heartbeat">
<meta_attributes id="Filesystem_meta_attrs">
<attributes>
<nvpair id="Filesystem_metaattr_target_role" name="target_role" value="started"/>
</attributes>
</meta_attributes>
<instance_attributes id="Filesystem_instance_attrs">
<attributes>
<nvpair id="c939fd00-2040-4145-b092-a4f07675a00c" name="fstype" value="ext3"/>
<nvpair id="8eb0a257-b17f-476a-95af-af85dcda9b39" name="device" value="/dev/drbd0"/>
<nvpair id="74e30367-1c34-47e2-bef3-da0b17fd268d" name="directory" value="/data/replicated"/>
</attributes>
</instance_attributes>
</primitive>
<primitive id="apache" class="ocf" type="apache" provider="heartbeat">
<meta_attributes id="apache_meta_attrs">
<attributes>
<nvpair id="apache_metaattr_target_role" name="target_role" value="started"/>
</attributes>
</meta_attributes>
<instance_attributes id="apache_instance_attrs">
<attributes>
<nvpair id="3b007044-cafb-4759-a769-f9867ebac2b5" name="configfile" value="/etc/apache2/httpd.conf"/>
<nvpair id="8af00a73-2397-4f4f-b537-2a7e0306bb80" name="httpd" value="/usr/sbin/httpd2"/>
<nvpair id="abe7ea3a-cfa9-4258-8214-3e7403dd2c4e" name="port" value="443"/>
<nvpair id="74713ed3-ecfe-4919-919b-486f85e887f8" name="httpd" value="/usr/sbin/apache2ctl"/>
<nvpair id="2c8b2c15-d7ad-471d-89f6-efff3b4823f8" name="options" value="-DSSL"/>
</attributes>
</instance_attributes>
<operations>
<op id="311e0405-046d-4749-a776-f5b7a324d504" name="monitor" interval="10" timeout="20" start_delay="1m"/>
</operations>
</primitive>
<primitive id="tomcat" class="ocf" type="tomcat" provider="heartbeat">
<meta_attributes id="tomcat_meta_attrs">
<attributes>
<nvpair id="tomcat_metaattr_target_role" name="target_role" value="started"/>
</attributes>
</meta_attributes>
<instance_attributes id="tomcat_instance_attrs">
<attributes>
<nvpair id="025a103e-f601-48cc-9bb8-3029dee6ecc2" name="java_home" value="/usr/lib/jvm/jre"/>
<nvpair id="1decfef4-d371-4877-b1a3-91df7db92701" name="catalina_home" value="/opt/tomcat"/>
</attributes>
</instance_attributes>
</primitive>
</resources>
<constraints>
<rsc_order id="mylogin" from="Filesystem" action="start" to="pg-drbd" to_action="promote" type="after"/>
<rsc_colocation score="INFINITY" to="Filesystem" to_role="master" id="mylogin" from="pg-drbd"/>
<rsc_colocation id="colocation_" from="apache" to="tomcat" score="INFINITY"/>
</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