I have 2 nodes on my setup running na active/passive configuration with
postgresql, drbd and drbdlinks.

 

 

When heartbeat is started(on both nodes) my node called pgslave gets
promoted to DC and that cannot happen, my node pgmaster should always be
the active part of the service and also this node needs to always try to
get promoted to DC when he have the chance(pgslave gotta spend minimal
time being DC, only in case of pgmaster failing).

 

Can you guys give me some advice on how to solve this ??

 

here are my conf files:

 

ha.cf

 

keepalive 2

deadtime 30

warntime 10

initdead 120

bcast   eth0

auto_failback on

apiauth         mgmtd   uid=root

respawn         root    /usr/lib/heartbeat/mgmtd -v

crm yes

node    pgmaster.blumar.com.br

node    pgslave.blumar.com.br

 

cib.xml

 

<cib admin_epoch="0" have_quorum="true" ignore_dtd="false" num_peers="2"
cib_feature_revision="2.0" epoch="100" generated="true"
ccm_transition="4" dc_uuid="56ec2257-b0e1-4395-8ca2-ff2f96151b55"
num_updates="1" cib-last-written="Fri Feb 29 08:56:44 2008">

   <configuration>

     <crm_config>

       <cluster_property_set id="cib-bootstrap-options">

         <attributes>

           <nvpair id="cib-bootstrap-options-dc-version"
name="dc-version" value="2.1.3-node:
552305612591183b1628baa5bc6e903e0f1e26a3"/>

           <nvpair id="cib-bootstrap-options-last-lrm-refresh"
name="last-lrm-refresh" value="1204283994"/>

         </attributes>

       </cluster_property_set>

     </crm_config>

     <nodes>

       <node id="34a67e55-71b1-421f-96cc-519ef05b110b"
uname="pgslave.blumar.com.br" type="normal">

         <instance_attributes
id="nodes-34a67e55-71b1-421f-96cc-519ef05b110b">

           <attributes>

             <nvpair id="standby-34a67e55-71b1-421f-96cc-519ef05b110b"
name="standby" value="off"/>

           </attributes>

         </instance_attributes>

       </node>

       <node id="56ec2257-b0e1-4395-8ca2-ff2f96151b55"
uname="pgmaster.blumar.com.br" type="normal"/>

     </nodes>

     <resources>

       <master_slave id="ms-drbd0">

         <meta_attributes id="ma-ms-drbd0">

           <attributes>

             <nvpair id="ma-ms-drbd0-1" name="clone_max" value="2"/>

             <nvpair id="ma-ms-drbd0-2" name="clone_node_max"
value="1"/>

             <nvpair id="ma-ms-drbd0-3" name="master_max" value="1"/>

             <nvpair id="ma-ms-drbd0-4" name="master_node_max"
value="1"/>

             <nvpair id="ma-ms-drbd0-5" name="notify" value="yes"/>

             <nvpair id="ma-ms-drbd0-6" name="globally_unique"
value="false"/>

             <nvpair id="ma-ms-drbd0-7" name="target_role"
value="started"/>

           </attributes>

         </meta_attributes>

         <primitive id="drbd0" class="ocf" provider="heartbeat"
type="drbd">

           <instance_attributes id="ia-drbd0">

             <attributes>

               <nvpair id="ia-drbd0-1" name="drbd_resource"
value="repdata"/>

             </attributes>

           </instance_attributes>

           <meta_attributes id="drbd0:0_meta_attrs">

             <attributes/>

           </meta_attributes>

         </primitive>

       </master_slave>

       <group id="group_pgsql">

         <meta_attributes id="group_pgsql_meta_attrs">

           <attributes>

             <nvpair id="group_pgsql_metaattr_target_role"
name="target_role" value="started"/>

           </attributes>

         </meta_attributes>

         <primitive id="resource_ip" class="ocf" type="IPaddr"
provider="heartbeat">

           <instance_attributes id="resource_ip_instance_attrs">

             <attributes>

               <nvpair id="f294ba51-00f9-4a9b-80c0-43aa7944f474"
name="ip" value="10.3.3.24"/>

             </attributes>

           </instance_attributes>

           <meta_attributes id="resource_ip_meta_attrs">

             <attributes/>

           </meta_attributes>

         </primitive>

         <primitive id="resource_FS" class="ocf" type="Filesystem"
provider="heartbeat">

           <instance_attributes id="resource_FS_instance_attrs">

             <attributes>

               <nvpair id="d1413b97-4944-4fee-9cba-b4ab3e71f83f"
name="device" value="/dev/drbd0"/>

               <nvpair id="baad1fbb-3389-4778-8832-91d5720341a6"
name="directory" value="/repdata"/>

               <nvpair id="35e6e951-ace4-4bbf-9d3e-5824219a9809"
name="fstype" value="ext3"/>

             </attributes>

           </instance_attributes>

           <meta_attributes id="resource_FS_meta_attrs">

             <attributes/>

           </meta_attributes>

         </primitive>

         <primitive id="resource_pgsql" class="ocf" type="pgsql"
provider="heartbeat">

           <meta_attributes id="resource_pgsql_meta_attrs">

             <attributes/>

           </meta_attributes>

         </primitive>

         <primitive id="resource_drbdlinks" class="heartbeat"
type="drbdlinks" provider="heartbeat"/>

       </group>

     </resources>

     <constraints>

       <rsc_colocation id="colocation_" from="group_pgsql"
to="group_pgsql" score="INFINITY"/>

       <rsc_location id="location_" rsc="group_pgsql">

         <rule id="prefered_location_" score="INFINITY">

           <expression attribute="#uname"
id="a7b8a885-27c2-4157-a597-42dd6cafba8c" operation="eq"
value="pgmaster.blumar.com.br"/>

         </rule>

       </rsc_location>

     </constraints>

   </configuration>

 </cib>

 

 

 

Carlos Alexandre
Analista de Suporte 

Direct Phone: + 55 21 2142-9383
www.blumar.com.br <http://www.blumar.com.br>  

  

 

 

 

 

 

Av. Borges de Medeiros, 633 - Sala 405 a 408 - Leblon - Rio de janeiro -
Brasil - 22430-041 
www.blumar.com.br <http://www.blumar.com.br>  phone: +55 21 2142 9300
fax: +55 21 2511 3739 

 

 

<<image001.gif>>

<<image002.gif>>

<<image003.gif>>

<<image004.gif>>

_______________________________________________
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