Site Tools


pacemaker_corosync

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
pacemaker_corosync [2011/04/27 12:00] – created paulsmithpacemaker_corosync [2011/04/27 12:35] (current) paulsmith
Line 1: Line 1:
 +====== Pacemaker & Corosync ======
 +
 +
 +===== pacemaker + corosync =====
 +<code>
 +reason: heartbeat is no longer being developed.
 +
 +Please note, that you have to remove user id 65 (cluster) manually, if you want to use the pacemaker ebuild. Both /etc/passwd and /etc/group
 +
 +configure corosync.conf
 +/usr/lib64/heartbeat/haresources2cib.py /etc/ha.d/haresources
 +chown hacluster:haclient /var/lib/heartbeat/crm
 +chown hacluster:haclient /var/lib/pengine
 +chmod 760 /var/lib/pengine
 +/etc/init.d/corosync start
 +
 +cibadmin --upgrade --force
 +cibadmin --cib_query > /tmp/tmp.xml
 +
 +/etc/init.d/corossync stop
 +
 +mv /var/lib/heartbeat/crm/cib.xml /var/lib/heartbeat/crm/cib.xml.old
 +cp /tmp/tmp.xml /var/lib/heartbeat/crm/cib.xml
 +
 +NOTE: must be run on the console not thru ssh!     corosync-authkey
 +
 +/etc/init.d/corosync start
 +
 +configure property no-quorum-policy=ignore
 +
 +node2~: sudo mv ~/authkey /etc/corosync/authkey
 +node2~: sudo chown root:root /etc/corosync/authkey
 +node2~: sudo chmod 400 /etc/corosync/authkey
 +
 +
 +references:
 +http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
 +http://clusterlabs.org/wiki/Example_XML_configurations
 +http://clusterlabs.org/wiki/Example_configurations
 +
 +
 +</code>
 +
 +===== create a tunnel for the multicast is you have issues with smart swiches =====
 +<code>
 +on server1:
 +/sbin/modprobe ip_gre
 +/sbin/ip tunnel add netb mode gre remote 192.168.122.XX local 192.168.122.YY ttl 255
 +/sbin/ip link set netb up
 +/sbin/ip addr add 172.16.22.1 dev netb
 +/sbin/ip route add 172.16.23.0/24 dev netb
 +/sbin/ifconfig netb multicast
 +/sbin/ip route add 226.94.1.0/24 dev netb
 +
 +
 +on server2:
 +/sbin/modprobe ip_gre
 +/sbin/ip tunnel add neta mode gre remote 192.168.122.YY local 192.168.122.XX ttl 255
 +/sbin/ip link set neta up
 +/sbin/ip addr add 172.16.23.1 dev neta
 +/sbin/ip route add 172.16.22.0/24 dev neta
 +/sbin/ifconfig neta multicast
 +/sbin/ip route add 226.94.1.0/24 dev neta
 +
 +note:
 +both corosync.conf files will need there config to reflect the local side of the tunnel bindnetaddr: 172.16.23.0
 +
 +</code>
 +
 +===== change cib.xml and get pacemaker to accept it =====
 +<code>
 +crm_verify -VVVVV -x newcib.xml
 +cibadmin -R -o cib -x newcib.xml
 +cibadmin -Q | less
 +</code>
 +
 +===== removal of this version =====
 +<code>
 +emerge -C cluster-glue resource-agents pacemaker corosync
 +</code>