User Tools

Site Tools


Sidebar

software:cluster:rhcs_pacemaker_rhel6

rhel6 / pacemaker

yum -y install pacemaker

# pulls as deps also these:
# clusterlib pacemaker-cli corosync cluster-glue pacemaker resource-agents

# generate key
corosync-keygen
# if you are low on entropy you could use something like this:
# while true; do ssh rhel6u2b "exit"; done

# man 5 corosync.conf
# in the configfile below change
#  - the memberaddresses
#  - the bindnetaddr to the ip of the node
cat >/etc/corosync/corosync.conf <<EOT
# Please read the corosync.conf.5 manual page
compatibility: whitetank

totem {
        version: 2
        secauth: off
        interface {
                member {
                        memberaddr: 192.168.4.23
                }
                member {
                        memberaddr: 192.168.4.21
                }
                ringnumber: 0
                bindnetaddr: 192.168.4.23
                mcastport: 5405
                ttl: 1
        }
        transport: udpu
}

logging {
        fileline: off
        to_logfile: yes
        to_syslog: yes
        debug: on
        logfile: /var/log/cluster/corosync.log
        debug: off
        timestamp: on
        logger_subsys {
                subsys: AMF
                debug: off
        }
}
EOT

cat >/etc/corosync/service.d/pcmk <<EOT
service {
        # Load the Pacemaker Cluster Resource Manager
        name: pacemaker
        ver:  0
}
EOT

cd /etc/corosync
scp authkey corosync.conf rhel6u2a:/etc/corosync/
scp service.d/pcmk rhel6u2a:/etc/corosync/service.d

# crmd daemon has always run as non-root.
# but it does keep the root group, the the log file needs to be writable by that.
# => on both nodes:
chmod 770 /var/log/cluster
software/cluster/rhcs_pacemaker_rhel6.txt ยท Last modified: 2021/03/23 12:22 (external edit)