This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
Corosync Pacemaker Setup
Ajay Paratmandali edited this page Oct 22, 2020
·
1 revision
Note:
- Run step 1-3 below, on both nodes and other step on primary node node.
- For configure it on one node follow all step as considering node1
- Disable selinux policy on both nodes
$ vi /etc/selinux/config
SELINUX=disabled # Set selinux policy to disabled
$ init 6 # Restart node
- Disable firewall on both nodes
$ systemctl stop firewalld
$ systemctl disable firewalld
- Make sure /etc/hosts is reflected properly or DNS is updated to resolve host names
$ cat /etc/hosts
10.0.15.10 node1
10.0.15.11 node2
Install EPEL Repository, corosync pacemaker pcsd.
$ yum -y install epel-release
$ yum -y install corosync pacemaker pcs
Enable pacemaker, corosync, and pcsd service
$ systemctl enable pcsd
$ systemctl enable corosync
$ systemctl enable pacemaker
Start pcsd service
$ systemctl start pcsd
Configure a password for the 'hacluster' user.
$ echo <new-password> | passwd --stdin hacluster
Authorise all servers with the pcs command and hacluster user and password.
$ pcs cluster auth node1 node2
Username: hacluster
Password:
Set up the cluster. Define cluster name and servers that will be part of the cluster.
$ pcs cluster setup --name HA_cluster node1 node2
Now start all cluster services and also enable them.
$ pcs cluster start --all
$ pcs cluster enable --all
Since we're not using the fencing device, we will disable the STONITH. STONITH or Shoot The Other Node In The Head is the fencing implementation on Pacemaker. If you're in production, it's better to enable STONITH.
$ pcs property set stonith-enabled=false
$ pcs property set no-quorum-policy=ignore
$ pcs property list
Check cluster status
$ pcs status cluster