[DRBD-user] Errors and thoughts on heartbeat config from drbd users guide

Dominik Klein dk at in-telegence.net
Fri Jun 13 13:08:30 CEST 2008

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


There was a user on the linux-ha channel today that had problems with 
the config example from this page:

http://www.drbd.org/users-guide/s-heartbeat-crm.html

While looking at it, there were several things about it that are either 
wrong or at least not perfect.

* ordered and colocated default to true in groups - no need to specify 
them as you leave out other not absolutely needed things like IDs
* The attribute tags need to be closed - this is actually an error
* The target_role should not be set as an instance_attribute, but as a 
meta_attribute and not just for one primitive of the group but for the 
entire group. Actually, you might leave it out as it defaults to the 
highest target_role a group can have (namely started) anyway.
* LSB and Heartbeat resources do not need the provider option - does not 
cause any pain, but it is not needed

As in:

<group id="rg_mysql">
   <meta_attributes id="ma-rg_mysql">
     <attributes>
       <nvpair id="ma-rg_mysql-target_role" name="target_role" 
value="started"/>
     </attributes>
   </meta_attributes>
   <primitive class="heartbeat" type="drbddisk" id="drbddisk_mysql">
     <instance_attributes>
       <attributes>
         <nvpair name="1" value="mysql"/>
       </attributes>
     </instance_attributes>
   </primitive>
   <primitive class="ocf" type="Filesystem" provider="heartbeat" 
id="fs_mysql">
     <instance_attributes>
       <attributes>
         <nvpair name="device" value="/dev/drbd0"/>
         <nvpair name="directory" value="/var/lib/mysql"/>
         <nvpair name="type" value="ext3"/>
       </attributes>
-------^
     </instance_attributes>
   </primitive>
   <primitive class="ocf" type="IPaddr2" provider="heartbeat" id="ip_mysql">
     <instance_attributes>
       <attributes>
         <nvpair name="ip" value="192.168.42.1/24"/>
         <nvpair name="nic" value="eth0"/>
       </attributes>
-------^
     </instance_attributes>
   </primitive>
   <primitive class="lsb" type="mysqld" id="mysqld"/>
</group>

Leaving out the IDs makes this example readable, but the resulting 
configuration when copied/pasted will have unreadable, generated IDs. 
Your choice ;)

Regards
Dominik



More information about the drbd-user mailing list