Thursday, April 14, 2011

Redhat Cluster Commands -Linux

Checking status of the cluster
# clustat
Moving a service/package over to another node
# clusvcadm -r -m
Starting a service/package
# clusvcadm -e -m
Stopping/disabling a service/package
# clusvcadm -d

Resource Group Locking (for cluster Shutdown / Debugging):

clusvcadm -l --This prevents resource groups from starting on the local node.
clusvcadm -S --Show lock state
clusvcadm -u --Unlock local resource group manager.This allows resource groups to start on the local node.
clusvcadm -Z -Freeze group in place
clusvcadm -U -Unfreeze/thaw group

[root@host1 ~]# clustat -l
Cluster Status for host1cl @ Thu Apr 14 02:25:29 2011
Member Status: Quorate

Member Name ID Status
------ ---- ---- ------
host1.com 1 Online, Local, rgmanager
host2.com 2 Online, rgmanager

Service Information
------- -----------

Service Name : service:fibrbase
Current State : failed (114)
Flags : none (0)
Owner : none
Last Owner : host1.com
Last Transition : Thu Apr 14 01:39:21 2011

Service Name : service:fsgprod
Current State : failed (114)
Flags : none (0)
Owner : none
Last Owner : host1.com
Last Transition : Thu Apr 14 01:39:27 2011

Service Name : service:wcmnrocp
Current State : failed (114)
Flags : none (0)
Owner : none
Last Owner : host1.com
Last Transition : Thu Apr 14 01:30:20 2011

[root@host1~]#


Gracefully halting the cluster
# clusvcadm -d
**Do the following on each node:**
# umount
# service rgmanager stop
# service gfs stop
# service clvmd stop
# service fenced stop
# cman_tool status
# cman_tool leave
# service ccsd stop

Gracefully starting the cluster (Done on each node)
# service ccsd start
# service cman start
# service fenced start
# service clvmd start
# service gfs start
# service rgmanager start
# cman_tool nodes (shows status of nodes)

No comments: