Table of Contents

HA Cluster (High Availability)

RGMANAGER CLI Commands Cheet Sheat and RGMANAGER Configuration Examples



RHEL5 or RHEL 6 was used RGMANAGER.
But RHEL 7 was adopted Pacemaker. Check Pacemaker CLI Commands Cheet Sheat



Basic


Install

# yum install cman rgmanager


Make Quorum Disk

mkqdisk -c DEVICE -l QUORUMNAME

#example
mkqdisk -c /dev/mapper/mpath5 -l quorum
mkqdisk -c /dev/sdb1 -l quorum

Check Quorum Disk

mkqdisk -L        <-  -L : List
mkqdisk -d -L     <-  -d : debug(Check Last update, Master)


Configuration

/etc/cluster/cluster.conf


Commands

Check

Operation Commands Note
Check Cluster clustat -l
cman_tool status
cman_tool nodes
Check QuorumDisk mkqdisk -d -L -d : debug
-L : List
Check cluster.conf ccs_config_validate
Check cluster ccs_config_dump
Check cluster.conf rg_test test /etc/cluster/cluster.conf
Check cluster rg_test noop /etc/cluster/cluster.conf start service SERVICE_NAME

Operation

Operation Commands Note
start/stop Qdisk /etc/init.d/qdiskd start
/etc/init.d/qdiskd stop
start/stop fenced /etc/init.d/fenced start
/etc/init.d/fenced stop
start/stop cman /etc/init.d/cman start
/etc/init.d/cman stop
start/stop rgmanager /etc/init.d/rgmanager start
/etc/init.d/rgmanager stop

After rgmanager started with autostart=“0”.

Operation Commands Note
Updating the cluster configuration
(deploied cluster.conf from active server to standby server)
ccs_tool update /etc/cluster/cluster.conf (RHEL5)
cman_tool version -r (RHEL6)
enable/disable SERVICE after rgmanager started. clusvcadm -e SERVICE_NAME ← enable
clusvcadm -d SERVICE_NAME ← disable
clusvcadm -e SERVICE_NAME -m NODE
clusvcadm -d SERVICE_NAME -m NODE
-e : enable
-d : disable
-m : member
manually fail over clusvcadm -r SERVICE_NAME -r : relocate
test fence cman_tool kill -n NODE


Example Commands

Example1

both node

# /etc/init.d/qdiskd start
# /etc/init.d/fenced start
# /etc/init.d/cman start
# clustat -l
# /etc/init.d/rgmanager start
# clustat -l

Example2

both node

# /etc/init.d/cman start
# clustat -l
# /etc/init.d/rgmanager start
# clustat -l


Check Cluster

# cman_tool nodes
Node  Sts   Inc   Joined               Name
   1   M    548   2010-09-28 10:52:21  node-01.example.com
   2   M    548   2010-09-28 10:52:21  node-02.example.com
   3   M    544   2010-09-28 10:52:21  node-03.example.com