CentOS 7
Ads

Pacemaker : Install
2015/06/23
 
Install and Configure Linux High-Availability Cluster tool "Pacemaker".
This example is based on the environment like follows. Configure basic cluster environment on here.
                                  |
+----------------------+          |          +----------------------+
| [       Node01     ] |10.0.0.51 | 10.0.0.52| [       Node02     ] |
|   node01.srv.world   +----------+----------+   node02.srv.world   |
|                      |                     |                      |
+----------------------+                     +----------------------+

[1] Install Pacemaker like follows on all Nodes.
[root@node01 ~]#
yum -y install pacemaker pcs
[root@node01 ~]#
systemctl start pcsd

[root@node01 ~]#
systemctl enable pcsd
# set password for cluster admin user

[root@node01 ~]#
passwd hacluster

Changing password for user hacluster.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[2] Configure like follows on a Node.
# establish authorization

[root@node01 ~]#
pcs cluster auth node01.srv.world node02.srv.world

Username:
hacluster

Password:
node01.srv.world: Authorized
node02.srv.world: Authorized
# configure cluster

[root@node01 ~]#
pcs cluster setup --name ha_cluster node01.srv.world node02.srv.world

Shutting down pacemaker/corosync services...
Redirecting to /bin/systemctl stop pacemaker.service
Redirecting to /bin/systemctl stop corosync.service
Killing any remaining services...
Removing all cluster configuration files...
node01.srv.world: Succeeded
node02.srv.world: Succeeded
# start srvices for cluster

[root@node01 ~]#
pcs cluster start --all

node02.srv.world: Starting Cluster...
node01.srv.world: Starting Cluster...
# enable cluster

[root@node01 ~]#
pcs cluster enable --all

node01.srv.world: Cluster Enabled
node02.srv.world: Cluster Enabled
# show status

[root@node01 ~]#
pcs status cluster

Cluster Status:
 Last updated: Wed Jun 23 19:36:55 2015
 Last change: Wed Jun 23 19:36:47 2015
 Stack: corosync
 Current DC: node01.srv.world (1) - partition with quorum
 Version: 1.1.12-a14efad
 2 Nodes configured
 0 Resources configured

[root@node01 ~]#
pcs status corosync

Membership information
----------------------
    Nodeid      Votes Name
         1          1 node01.srv.world (local)
         2          1 node02.srv.world
 
Tweet