Hello all,

We have the following chalange, where I could use some help with.
The design was made that the DB2-servers were implemented in the
so-called HADR-solution, which means that changes applied to the primary
database are automatically performed on the standby database in sync- or
nearsync-mode.
The implementation of such a design is not a problem: we know how to do
this and have succeeded in getting such a solution up and running.
The setup is: two RHEL4 boxes, both running db2 8.2 that are configured
as hadr db's.
So srv202 is servicing the primary db somedb, and srv203 is running the
standby db somedb,
Now the real chalenge became how to automate the takeover of the standby
db if the primary db failed.
So we choose heartbeat to do that bidding for us.
We started out with a document profided by IBM,
ftp://ftp.software.ibm.com/software/data/pubs/papers/hadr_ha.pdf
We found however that there were several issues with this document.
1. it involved using heartbeat version 1.x.x, an since I always try to
use the most recent stable version of software I use, I choose version
2.1.2.3 (which is the most recent stable at the time we started).
2. A script was mentioned, of which I can not to date find any reference
of anywhere outside this document. (in this document is a script "Hadr"
which after one changes it to have it run in their own environment, is
to be put in /etc/ha.d/resource.d/ and the second script that is
mentioned, and should also be in /etc/ha.d/resource.d/ is
"checkInstRemote" which is only mentioned in this document and nowhere
else (on the internet)).
So upon configuring heartbeat 2.1.2, I created a resource group and I
found that creating  the virtual/floating ip we needed was peanuts.... 
I also configured the ocf ra db2. and this is where I have  my
challenge..... I seem to mis something, because whatever configuration I
can think of, it does not do what I want.
One of the things I am fighting with is that it starts either on both
hosts or at least on the wrong one. I was already strugeling with the
colocation bit (INFINITY) so ip nr and db2 ra staid together, but It
seems I keep doing things wrong. 

So if there is anybody on this list that is able to help me out here,
that would be greatly apreciated.

At this moment I have the following cib.xml configuration:

[EMAIL PROTECTED] crm]# less cib.xml
 <cib admin_epoch="0" have_quorum="true" ignore_dtd="false"
num_peers="2" ccm_transition="6" cib_feature_revision="1.3" generated="t
rue" dc_uuid="48e32f6e-24c1-45aa-8e8b-1890e1bdd3ce" epoch="112"
num_updates="1" cib-last-written="Wed Oct 17 15:50:00 2007">
   <configuration>
     <crm_config>
       <cluster_property_set id="cib-bootstrap-options">
         <attributes>
           <nvpair id="cib-bootstrap-options-symmetric-cluster"
name="symmetric-cluster" value="true"/>
           <nvpair id="cib-bootstrap-options-no-quorum-policy"
name="no-quorum-policy" value="stop"/>
           <nvpair
id="cib-bootstrap-options-default-resource-stickiness"
name="default-resource-stickiness" value="0"/>
           <nvpair
id="cib-bootstrap-options-default-resource-failure-stickiness"
name="default-resource-failure-stickiness" value="
0"/>
           <nvpair id="cib-bootstrap-options-stonith-enabled"
name="stonith-enabled" value="false"/>
           <nvpair id="cib-bootstrap-options-stonith-action"
name="stonith-action" value="reboot"/>
           <nvpair id="cib-bootstrap-options-stop-orphan-resources"
name="stop-orphan-resources" value="true"/>
           <nvpair id="cib-bootstrap-options-stop-orphan-actions"
name="stop-orphan-actions" value="true"/>
           <nvpair id="cib-bootstrap-options-remove-after-stop"
name="remove-after-stop" value="false"/>
           <nvpair id="cib-bootstrap-options-short-resource-names"
name="short-resource-names" value="true"/>
           <nvpair id="cib-bootstrap-options-transition-idle-timeout"
name="transition-idle-timeout" value="5min"/>
           <nvpair id="cib-bootstrap-options-default-action-timeout"
name="default-action-timeout" value="15s"/>
           <nvpair id="cib-bootstrap-options-is-managed-default"
name="is-managed-default" value="true"/>
           <nvpair name="last-lrm-refresh"
id="cib-bootstrap-options-last-lrm-refresh" value="1192628995"/>
         </attributes>
       </cluster_property_set>
     </crm_config>
     <nodes>
       <node id="aa555321-b0ae-4295-b330-bbd1aa2065bc" uname="srv21203"
type="normal">
         <instance_attributes
id="nodes-aa555321-b0ae-4295-b330-bbd1aa2065bc">
           <attributes>
             <nvpair id="standby-aa555321-b0ae-4295-b330-bbd1aa2065bc"
name="standby" value="off"/>
           </attributes>
         </instance_attributes>
       </node>
       <node id="48e32f6e-24c1-45aa-8e8b-1890e1bdd3ce" uname="srv21202"
type="normal"/>
     </nodes>
     <resources>
       <group id="db2_hadr" ordered="true" collocated="true">
         <primitive id="virtual_IP" class="ocf" type="IPaddr2"
provider="heartbeat">
           <instance_attributes id="virtual_IP_instance_attrs">
             <attributes>
               <nvpair id="c18a6881-9cf9-42b2-a3d7-7facee1ee8d6"
name="ip" value="10.82.27.60"/>
               <nvpair id="b392d5a0-4e72-4738-a84f-d03f8752ab3d"
name="nic" value="eth1"/>
               <nvpair id="virtual_IP_target_role" name="target_role"
value="started"/>
             </attributes>
           </instance_attributes>
         </primitive>
         <primitive id="db2_hadrp" class="ocf" type="db2"
provider="heartbeat">
           <instance_attributes id="db2_hadrp_instance_attrs">
             <attributes>
               <nvpair id="db2_hadrp_target_role" name="target_role"
value="started"/>
               <nvpair id="4f94c4e4-8ef3-4e70-8ee1-0f76f2bc9054"
name="instance" value="pibi"/>
             </attributes>
           </instance_attributes>
         </primitive>
       </group>
     </resources>
     <constraints>
       <rsc_location id="rcs_location_db2_hadr" rsc="db2_hadr">
         <rule id="prefered_rcs_location_db2_hadr" score="100">
           <expression attribute="#uname"
id="4da9b730-e33c-48c3-a339-13f486c5f62e" operation="eq"
value="srv21202"/>
         </rule>
       </rsc_location>
     </constraints>
   </configuration>
 </cib>
cib.xml


Bert Koster
Linux Consultant
AWEKA Solutions

phone: 036 535 04 71
mobile 06 246 09 207
email: [EMAIL PROTECTED]

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to