[Pacemaker] Pacemaker config file best practices

Greg DeCecco gdececco at voomboom.com
Mon May 17 20:25:29 EDT 2010


I've put together a Pacemaker configuration using one failover IP, four DRBD resources, four iSCSI Targets, and four iSCSI Logical Units.  The Pacemaker config file is listed at the bottom.  I'm curious if there is a better way for the resources in my config file to be arranged/listed/grouped?

While trying to set this environment up, the biggest problem I had was getting the iSCSI Logical Units to come online without having to issue a "crm resource cleanup iscsiLU#" command.  This config works great most of the time.  Still, every once in a while an iscsiLU will not start properly during a failover and I have to issue a cleanup command.  If you have any suggestions, I am all ears.

Thank you for your time and effort.

~Greg DeCecco


node iscsi1 \
        attributes standby="off"
node iscsi2 \
        attributes standby="off"
primitive drbd_disk1 ocf:linbit:drbd \
        params drbd_resource="FastSmallStorage1" \
        op monitor interval="15s" \
        meta target-role="started"
primitive drbd_disk2 ocf:linbit:drbd \
        params drbd_resource="LargeSlowStorage1" \
        op monitor interval="15s" \
        meta target-role="started"
primitive drbd_disk3 ocf:linbit:drbd \
        params drbd_resource="FastSmallStorage2" \
        op monitor interval="15s" \
        meta target-role="started"
primitive drbd_disk4 ocf:linbit:drbd \
        params drbd_resource="LargeSlowStorage2" \
        op monitor interval="15s" \
        meta target-role="started"
primitive failover-ip ocf:heartbeat:IPaddr2 \
        params ip="192.168.5.60" \
        op monitor interval="5s" timeout="20s" depth="0"
primitive iscsiLU1 ocf:heartbeat:iSCSILogicalUnit \
        params lun="0" path="/dev/drbd/by-res/FastSmallStorage1" target_iqn="iqn.2010-04.com.voomboom.corp:iscsi.FastSmallStorage1" \
        meta target-role="Started"
primitive iscsiLU2 ocf:heartbeat:iSCSILogicalUnit \
        params lun="1" path="/dev/drbd/by-res/LargeSlowStorage1" target_iqn="iqn.2010-04.com.voomboom.corp:iscsi.LargeSlowStorage1"
primitive iscsiLU3 ocf:heartbeat:iSCSILogicalUnit \
        params lun="2" path="/dev/drbd/by-res/FastSmallStorage2" target_iqn="iqn.2010-04.com.voomboom.corp:iscsi.FastSmallStorage2"
primitive iscsiLU4 ocf:heartbeat:iSCSILogicalUnit \
        params lun="3" path="/dev/drbd/by-res/LargeSlowStorage2" target_iqn="iqn.2010-04.com.voomboom.corp:iscsi.LargeSlowStorage2"
primitive iscsiTG1 ocf:heartbeat:iSCSITarget \
        params iqn="iqn.2010-04.com.voomboom.corp:iscsi.FastSmallStorage1" implementation="iet" \
        meta target-role="Started"
primitive iscsiTG2 ocf:heartbeat:iSCSITarget \
        params iqn="iqn.2010-04.com.voomboom.corp:iscsi.LargeSlowStorage1" implementation="iet" \
        meta target-role="Started"
primitive iscsiTG3 ocf:heartbeat:iSCSITarget \
        params iqn="iqn.2010-04.com.voomboom.corp:iscsi.FastSmallStorage2" implementation="iet" \
        meta target-role="Started"
primitive iscsiTG4 ocf:heartbeat:iSCSITarget \
        params iqn="iqn.2010-04.com.voomboom.corp:iscsi.LargeSlowStorage2" implementation="iet" \
        meta target-role="Started"
group services_on_master failover-ip iscsiTG1 iscsiTG2 iscsiTG3 iscsiTG4 iscsiLU1 iscsiLU2 iscsiLU3 iscsiLU4
ms ms_drbd1 drbd_disk1 \
        meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"
ms ms_drbd2 drbd_disk2 \
        meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"
ms ms_drbd3 drbd_disk3 \
        meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"
ms ms_drbd4 drbd_disk4 \
        meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"
colocation cloc01 inf: failover-ip ms_drbd1:Master
colocation cloc02 inf: failover-ip ms_drbd2:Master
colocation cloc03 inf: failover-ip ms_drbd3:Master
colocation cloc04 inf: failover-ip ms_drbd4:Master
colocation cloc05 inf: iscsiTG1 failover-ip
colocation cloc06 inf: iscsiTG2 failover-ip
colocation cloc07 inf: iscsiTG3 failover-ip
colocation cloc08 inf: iscsiTG4 failover-ip
colocation cloc09 inf: iscsiLU1 failover-ip
colocation cloc10 inf: iscsiLU2 failover-ip
colocation cloc11 inf: iscsiLU3 failover-ip
colocation cloc12 inf: iscsiLU4 failover-ip
order or01 inf: failover-ip iscsiTG1
order or02 inf: failover-ip iscsiTG2
order or03 inf: failover-ip iscsiTG3
order or04 inf: failover-ip iscsiTG4
order or05 inf: ms_drbd1:promote iscsiLU1
order or06 inf: ms_drbd2:promote iscsiLU2
order or07 inf: ms_drbd3:promote iscsiLU3
order or08 inf: ms_drbd4:promote iscsiLU4
property $id="cib-bootstrap-options" \
        dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \
        cluster-infrastructure="openais" \
        expected-quorum-votes="2" \
        no-quorum-policy="ignore" \
        stonith-enabled="false" \
        default-action-timeout="60" \
        last-lrm-refresh="1274036665"




More information about the Pacemaker mailing list