[Pacemaker] SLES11+HAE: Resources on a single node with two configured?

Aleksey Zholdak aleksey at zholdak.com
Mon Apr 26 03:29:01 EDT 2010


Hi!

I have configured a cluster of two nodes.
Everything works fine.
Creates a situation where when you start two nodes one does not start due 
to hardware failure.
Tell me please, how do I temporarily run resources on one node?
No Quorum, openais waiting at least two votes to run resources. Setting the 
expected-quorum-votes="1" does not give results.

How do I do to achieve the desired goal to me.

1. Run one node of the two.
2. crm configure property expected-quorum-votes = "1"
3. crm configure property stonith-enabled = "false"
4. rcopenais stop
--> stops continues indefinitely, so it has to kill.
5. Ctrl-C
6. ps ax | grep crm
7. kill <crm_proc_id>
8. rcopenais start

Bingo! Resources are running on one node of two. This is a working method, 
but not quite as it seems to me normal.

How to achieve the desired result without these dances with a tambourine?

Below is my config. Thank you in advance.

---8<-------------------------------------------------------------------------

node sles1
node sles2
primitive apache ocf:heartbeat:apache \
         meta target-role="Started" \
         params configfile="/eCluster/configures/apache2/httpd.conf" 
httpd="/usr/sbin/httpd2" statusurl="http://127.0.0.1:8088/server-status" \
         op monitor interval="10s" timeout="60s" depth="0"
primitive clvm ocf:lvm2:clvmd \
         params daemon_timeout="30"
primitive dlm ocf:pacemaker:controld \
         op monitor interval="120s"
primitive eCluster_vg0 ocf:heartbeat:LVM \
         params volgrpname="eCluster_vg0"
primitive ext_ip ocf:heartbeat:IPaddr2 \
         meta target-role="Started" \
         params ip="X.X.Y.Y" nic="vlan101" cidr_netmask="24" \
         op monitor interval="10s" timeout="20s" depth="0"
primitive fs ocf:heartbeat:Filesystem \
         params device="/dev/eCluster_vg0/eCluster_lv0" 
directory="/eCluster" fstype="ocfs2" \
         op monitor interval="120s"
primitive int_ip ocf:heartbeat:IPaddr2 \
         meta target-role="Started" \
         params ip="172.16.0.20" nic="vlan100" cidr_netmask="22" \
         op monitor interval="10s" timeout="20s" depth="0"
primitive mysql ocf:heartbeat:mysql \
         meta target-role="Started" migration-threshold="100" \
         params binary="/usr/bin/mysqld_safe" config="/etc/my.cnf" 
datadir="/eCluster/mysql" user="mysql" pid="/eCluster/mysql/mysql.pid" 
socket="/var/lib/mysql/mysql.sock" enable_creation="0" 
test_table="heartbeattest.connectioncheck" test_user="heartbeattest" 
test_passwd="sdjh287js2" \
         op monitor interval="10s" timeout="60s"
primitive o2cb ocf:ocfs2:o2cb \
         op monitor interval="120s"
primitive pingd ocf:pacemaker:pingd \
         params host_list="172.16.3.250" multiplier="100" \
         op monitor interval="5s" timeout="20s"
primitive sbd_fense stonith:external/sbd \
         params sbd_device="/dev/mapper/SBD"
group web_cluster int_ip ext_ip mysql apache
clone clvm-clone clvm \
         meta target-role="Started" interleave="true" ordered="true"
clone dlm-clone dlm \
         meta target-role="Started" globally-unique="false" 
interleave="true" ordered="true"
clone eCluster_vg0-clone eCluster_vg0 \
         meta interleave="true" ordered="true"
clone fs-clone fs \
         meta interleave="true" ordered="true"
clone o2cb-clone o2cb \
         meta globally-unique="false" interleave="true"
clone pingd-clone pingd \
         meta globally-unique="false" ordered="true"
clone sbd-clone sbd_fense \
         meta target-role="Started" ordered="true"
location location-web_cluster_on_connected_node web_cluster \
         rule $id="location-web_cluster_on_connected_node-rule" -inf: 
not_defined pingd or pingd lte 0
location location-web_cluster_on_preffered_sles2 web_cluster \
         rule $id="location-web_cluster_on_preffered_sles2-rule" 50: #uname 
eq sles2
colocation colo-clvm inf: clvm-clone dlm-clone
colocation colo-eCluster_vg0 inf: eCluster_vg0-clone clvm-clone
colocation fs-with-o2cb inf: fs-clone o2cb-clone
colocation o2cb-with-eCluster_vg0 inf: o2cb-clone eCluster_vg0-clone
colocation pingd-with-fs inf: pingd-clone fs-clone
colocation web_cluster-with-fs inf: web_cluster fs-clone
order order-clvm inf: dlm-clone clvm-clone
order order-eCluster_vg0 inf: clvm-clone eCluster_vg0-clone
order order-fs inf: o2cb-clone fs-clone
order order-o2cb inf: eCluster_vg0-clone o2cb-clone
order order-pingd inf: fs-clone pingd-clone
order order-web_cluster inf: fs-clone web_cluster
property $id="cib-bootstrap-options" \
         dc-version="1.0.6-c48e3360eb18c53fd68bb7e7dbe39279ccbc0354" \
         cluster-infrastructure="openais" \
         expected-quorum-votes="2" \
         stonith-enabled="true" \
         no-quorum-policy="ignore" \
         last-lrm-refresh="1271934110"
rsc_defaults $id="rsc-options" \
         resource-stickiness="100"




More information about the Pacemaker mailing list