[Pacemaker] Locating a clone on 2 nodes of a 4 node cluster

Art Zemon art at hens-teeth.net
Sat Dec 8 13:23:09 UTC 2012


Hello,

I need some help with the syntax for making a clone run on two nodes of a four node cluster. I have two OCFS2 filesystems: 
   * cl_fs_share_db should run on nodes aztestc3 and aztestc4
   * cl_fs_share_plesk should run on nodes aztestc1 and aztestc2
The files /etc/drbd.d/sharedb.res and /etc/drbd.d/shareplesk.res each specify the correct pair of nodes.

How do I update the following pacemaker configuration? Each clone should run in dual-primary mode on both of its nodes.

Side question: I have configured just one o2cb. Do I need two of them?

Thank you,
    -- Art Z.


node aztestc1 \
	attributes standby="off"
node aztestc2 \
	attributes standby="off"
node aztestc3 \
	attributes standby="off"
node aztestc4 \
	attributes standby="off"
primitive p_drbd_share_db ocf:linbit:drbd \
	params drbd_resource="sharedb" \
	op monitor interval="15s" role="Master" timeout="20s" \
	op monitor interval="20s" role="Slave" timeout="20s" \
	op start interval="0" timeout="240s" \
	op stop interval="0" timeout="100s"
primitive p_drbd_share_plesk ocf:linbit:drbd \
	params drbd_resource="shareplesk" \
	op monitor interval="15s" role="Master" timeout="20s" \
	op monitor interval="20s" role="Slave" timeout="20s" \
	op start interval="0" timeout="240s" \
	op stop interval="0" timeout="100s"
primitive p_fs_share_db ocf:heartbeat:Filesystem \
	params device="/dev/drbd/by-res/share" directory="/share" fstype="ocfs2" options="rw,noatime" \
	op start interval="0" timeout="60" \
	op stop interval="0" timeout="60" \
	op monitor interval="20" timeout="40"
primitive p_fs_share_plesk ocf:heartbeat:Filesystem \
	params device="/dev/drbd/by-res/share" directory="/share" fstype="ocfs2" options="rw,noatime" \
	op start interval="0" timeout="60" \
	op stop interval="0" timeout="60" \
	op monitor interval="20" timeout="40"
primitive p_mysqld lsb:mysql \
	meta target-role="Started" \
	op monitor interval="10" timeout="20"
primitive p_o2cb ocf:pacemaker:o2cb \
	params stack="cman" \
	op start interval="0" timeout="90" \
	op stop interval="0" timeout="100" \
	op monitor interval="10" timeout="20"
primitive p_stonith stonith:fence_ec2 \
	params pcmk_host_check="static-list" pcmk_host_list="aztestc1 aztestc2 aztestc3 aztestc4" \
	op monitor interval="600s" timeout="300s" \
	op start start-delay="10s" interval="0"
ms ms_drbd_share_db p_drbd_share_db \
	meta master-max="2" notify="true" interleave="true" clone-max="2" is-managed="true" target-role="Stopped"
ms ms_drbd_share_plesk p_drbd_share_plesk \
	meta master-max="2" notify="true" interleave="true" clone-max="2" is-managed="true" target-role="Stopped"
clone cl_fencing p_stonith \
	meta target-role="Started"
clone cl_fs_share_db p_fs_share_db \
	meta interleave="true" notify="true" globally-unique="false" target-role="Started"
clone cl_fs_share_plesk p_fs_share_plesk \
	meta interleave="true" notify="true" globally-unique="false" target-role="Started"
clone cl_o2cb p_o2cb \
	meta interleave="true" globally-unique="false" target-role="Stopped"
order o_mysqld inf: cl_fs_share_db p_mysqld
order o_ocfs2db inf: ms_drbd_share_db:promote cl_o2cb:start
order o_ocfs2plesk inf: ms_drbd_share_plesk:promote cl_o2cb:start
order o_sharedb inf: cl_o2cb cl_fs_share_db
order o_shareplesk inf: cl_o2cb cl_fs_share_plesk
property $id="cib-bootstrap-options" \
	stonith-enabled="true" \
	stonith-timeout="180s" \
	no-quorum-policy="freeze" \
	dc-version="1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c" \
	cluster-infrastructure="cman" \
	last-lrm-refresh="1354969282"
rsc_defaults $id="rsc-options" \
	resource-stickiness="100"

 

--
Art Zemon, President
 [http://www.hens-teeth.net/] Hen's Teeth Network for reliable web hosting and programming
 (866)HENS-NET / (636)447-3030 ext. 200 / www.hens-teeth.net





More information about the Pacemaker mailing list