Pacemaker

From DHVLab

Revision as of 15:11, 8 September 2016 by Wiki admin (talk | contribs) (Created page with "Category:OVirt Engine Cluster == Installing required dependencies == <syntaxhighlight lang="bash"> yum install pacemaker pcs resource-agents </syntaxhighlight> == Basic S...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Installing required dependencies

yum install pacemaker pcs resource-agents

Basic Setup

This has to be executed on all cluster nodes

systemctl enable pcsd.service

#change password
passwd hacluster

This has to be executed on one node only

pcs cluster auth CLUSTER_N1.clan CLUSTER_N2.clan
pcs cluster setup --name CLUSTER CLUSTER_N1.clan CLUSTER_N2.clan
pcs cluster start –-all

Distribute the /etc/corosync/corosync.conf to all nodes

totem {
    version: 2
    secauth: off
    cluster_name: CLUSTER
    transport: udpu
}

nodelist {
    node {
        ring0_addr: CLUSTER_N1.clan
        nodeid: 1
    }

    node {
        ring0_addr: CLUSTER_N2.clan
        nodeid: 2
    }
}

quorum {
    provider: corosync_votequorum
    two_node: 1
}

logging {
    to_logfile: yes
    logfile: /var/log/cluster/corosync.log
    to_syslog: yes
}
scp NODE1:/etc/corosync/corosync.conf /etc/corosync/corosync.conf
pcs cluster auth CLUSTER_N1.clan CLUSTER_N2.clan
pcs cluster setup --name CLUSTER CLUSTER_N1.clan CLUSTER_N2.clan
pcs cluster start –-all

This has to be executed on all cluster nodes

systemctl enable corosync.service
systemctl enable pacemaker.service

Check the status of the cluster using

pcs status

This has to be executed on one cluster node Temporarily disable stonith and quorum

pcs property set stonith-enabled=false
pcs property set no-quorum-policy=ignore

Add fencing

For example ILO

#add fencing for Node 1
pcs stonith create Fence1 fence_ilo2 pcmk_host_list="CLUSTER_N1.YOUR_DOMAIN" \
ipaddr=ILO_N1_IP login=Administrator passwd=PASSWD op monitor interval=60

#add fencing for Node 2
pcs stonith create Fence2 fence_ilo2 pcmk_host_list="CLUSTER_N2.YOUR_DOMAIN" \
ipaddr=ILO_N2_IP login=Administrator passwd=PASSWD op monitor interval=60

#enable stonith again
pcs property set stonith-enabled=true