O Pacemaker é um software gerenciador de recursos de alta disponibilidade de código aberto usado em clusters de computadores desde 2004.
Passo a passo:
Configurar o arquivo hosts (/etc/hosts)
192.168.0.108 pacemaker01
192.168.0.109 pacemaker02
Instale o Epel Repository
yum -y install epel-release
Instalar e configurar o Pacemaker, Corosync e Pcsd
yum -y install corosync pacemaker pcs
systemctl enable pcsd
systemctl enable corosync
systemctl enable pacemaker
systemctl start pcsd
passwd hacluster
Criar e configurar o cluster
pcs cluster auth pacemaker01 pacemaker02
pcs cluster setup --name teste_cluster pacemaker01 pacemaker02
pcs cluster start --all
pcs cluster enable --all
pcs status cluster
Desative STONITH e ignore a política de quorum
pcs property set stonith-enabled=false
pcs property set no-quorum-policy=ignore
pcs property list
Adicione o IP flutuante e recursos
pcs resource create virtual_ip ocf:heartbeat:IPaddr2 ip=192.168.0.110 cidr_netmask=32 op monitor interval=30s
pcs status resources
pcs cluster stop --all
pcs cluster start --all
pcs status resources
pcs status nodes