RHEL Clustering
This is my comment + notes from Udemy Class
Starting/Stopping Cluster Services
Show Cluster Status
[root@nodea /] pcs cluster status
Cluster Status:
Stack: corosync
Current DC: nodea.example.com (version 1.1.19-8.e17-c3c624ea3d) - partition with quorum
Last updated : Fri Mar 15 14:08:01 2019
Last change: Fri MAr 15 14:06:39 2019 by hacluster via crmd on nodea.example.com
3 nodes configured
3 resources configured
PCSD Status:
nodea.example.com: Online
nodeb.example.com: Online
nodec.example.com: Onlien
stop cluster services from all nodes
[root@nodea /] pcs cluster stop -all
nodea.example.com: Stopping Cluster (pacemaker)...
nodeb.example.com: Stopping Cluster (pacemaker)...
nodec.example.com: Stopping Cluster (pacemaker)...
nodea.example.com: Stopping Cluster (corosync)...
nodeb.example.com: Stopping Cluster (corosync)...
nodec.example.com: Stopping Cluster (corosync)...
start cluster services from all nodes
[root@nodea /] pcs cluster start -all
nodea.example.com: Starting Cluster (pacemaker)...
nodeb.example.com: Starting Cluster (pacemaker)...
nodec.example.com: Starting Cluster (pacemaker)...
nodea.example.com: Starting Cluster (corosync)...
nodeb.example.com: Starting Cluster (corosync)...
nodec.example.com: Starting Cluster (corosync)...
stop cluster services from the specific node
[root@nodea /] pcs cluster stop nodeb.example.com
nodeb.example.com: Stopping Cluster (pacemaker)...
nodeb.example.com: Stopping Cluster (corosync)...
start cluster services from the specific node
[root@nodea /] pcs cluster stop nodeb.example.com
nodeb.example.com: Starting Cluster (pacemaker)...
nodeb.example.com: Starting Cluster (corosync)...
Enabling/Disabling Cluster Services
enable cluster services from all nodes
[root@nodea /] pcs cluster enable --all
nodea.example.com: Cluster Enabled
nodeb.example.com: Cluster Enabled
nodec.example.com: Cluster Enabled
disable cluster services from all nodes
[root@nodea /] pcs cluster disable --all
nodea.example.com: Cluster Disabled
nodeb.example.com: Cluster Disabled
nodec.example.com: Cluster Disabled
enable cluster services from the specific node
[root@nodea /] pcs cluster enable nodeb.example.com
nodeb.example.com: Cluster Enabled
disable cluster services from the specific node
[root@nodea /] pcs cluster disable nodeb.example.com
nodeb.example.com: Cluster Disabled
Standby/Unstandby Cluster Services
standby node
[root@nodea /] pcs cluster standby noded.example.com
[root@nodea /] pcs cluster status
Stack: corosync
Current DC: nodea.example.com (version 1.1.19-8.e17-c3c624ea3d) - partition with quorum
Last updated: Fri Mar 15 18:07:44 2019
Last change: Fri Mar 15 18:07:27 2019 by root via cibadmin on nodea.example.com
4 nodes configured
4 resources configured
Node noded.example.com: standby
Online: [ nodea.example.com nodeb.example.com nodec.example.com ]
Full list of resources:
fence_nodea (stonith:fence_xvm): Started nodea.example.com
fence_nodeb (stonith:fence_xvm): Started nodeb.example.com
fence_nodec (stonith:fence_xvm): Started nodec.example.com
fence_noded (stonith:fence_xvm): Started noded.example.com
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled
unstandby node
[root@nodea /] pcs cluster unstandby noded.example.com
Adding/Removing a Cluster Node
add firewall rule for high-availability
[root@noded /] firewall-cmd --add-service=high-availability --permanent
success