[Pacemaker] pcs group colocation and ping rules

Andrew Beekhof andrew at beekhof.net
Wed May 15 01:36:02 EDT 2013

On 14/05/2013, at 12:08 AM, Diego Remolina <diego.remolina at physics.gatech.edu> wrote:

> On 05/13/2013 10:03 AM, Diego Remolina wrote:
>> Hi,
>> I was wondering if anybody can tell me what is the best way to replicate
>> the following crm commands in pcs. It seems pcs cannot do any
>> collocation rules using groups (or I just do not know how to properly do
>> it). I was also not able to figure out how to colocate a drbd resource
>> on the connected node using ping and rules.
>> These are the relevant entries one uses with crm:
>> group fileserver fs_export fs_scratch ClusterIP1 ClusterIP1arp nfs samba \
>>         meta target-role="Started"
>> primitive pingd ocf:pacemaker:ping \
>>         params host_list="" multiplier="100" \
>>         op monitor interval="5s" timeout="30s"
>> clone pingd-clone pingd \
>>         params ping-dampen="5s" ping-multiplier="100"
>> ping-hosts="" \
>>         meta target-role="Started"
>> location ms-drbd_export-on-connected-node ms-drbd_export \
>>         rule $id="ms-drbd_export-on-connected-node-rule" $role="Master"
>> -inf: not_defined pingd or pingd lte 0
> Seems like I missed one entry:
> colocation ms-drbd_export-with-fileserver inf: ms-drbd_export:Master fileserver

Most of the common usage is covered in the PCS edition of Clusters from Scratch.
For example:



   pcs -f fs_cfg constraint colocation add WebFS WebDataClone INFINITY with-rsc-role=Master

which for you would be:

   pcs constraint colocation add ms-drbd_export fileserver INFINITY rsc-role=Master

Granted it seems the syntax could use some work.

More information about the Pacemaker mailing list