Quick guide: how to manage Redhat Cluster in RHEL 5
Check cluster status
Disable cluster status
After disable, resource group shutdown and will not affect by server reboot and/or failover.
Enable cluster status
Freeze cluster resource group
After freeze resource group, it will not being monitored by the cluster manager. But current resource group state will not be affected by this command.
Unfreeze cluster resource group
Stop cluster resource group
Resource group can failover if current node due to fencing.
Restart cluster resource group
Resource group can failover if current node due to fencing.
Relocate resource to another member in the failover domain
Other useful commands
[root@ncs-db-1 ~]# clustat
Cluster Status for ncs_dbcluster @ Wed Sep 1 15:22:08 2009
Member Status: Quorate
Member Name ID Status
------ ---- ---- ------
ncs-db-n1 1 Online, Local, rgmanager
ncs-db-n2 2 Online, rgmanager
Service Name Owner (Last) State
------- ---- ----- ------ -----
service:clusvc ncs-db-n1 started
Disable cluster status
After disable, resource group shutdown and will not affect by server reboot and/or failover.
[root@ncs-db-1 ~]# clusvcadm -d clusvc
Local machine disabling service:clusvc...Success
Enable cluster status
[root@ncs-db-1 ~]# clusvcadm -e clusvc
Local machine trying to enable service:clusvc...Success
service:clusvc is now running on ncs-db-n1
Freeze cluster resource group
After freeze resource group, it will not being monitored by the cluster manager. But current resource group state will not be affected by this command.
[root@ncs-db-1 ~]# clusvcadm -Z clusvc
Local machine freezing service:clusvc...Success
Unfreeze cluster resource group
[root@ncs-db-1 ~]# clusvcadm -U clusvc
Local machine unfreezing service:clusvc...Success
Stop cluster resource group
Resource group can failover if current node due to fencing.
[root@ncs-db-1 ~]# clusvcadm -s clusvc
Local machine stopping service:clusvc...Success
Restart cluster resource group
Resource group can failover if current node due to fencing.
[root@ncs-db-1 ~]# clusvcadm -s clusvc
Local machine stopping service:clusvc...Success
Relocate resource to another member in the failover domain
[root@ncs-db-1 ~]# clusvcadm -r clusvc -m ncs-db-n2
Trying to relocate service:clusvc to ncs-db-n2...Success
service:clusvc is now running on ncs-db-n2
Other useful commands
[root@ncs-db-1 ~]# ccs_tool lsnode
Cluster name: ncs_dbcluster, config_version: 21
Nodename Votes Nodeid Fencetype
ncs-db-n1 1 1 ncs-db-1-ilo1
ncs-db-n2 1 2 ncs-db-2-ilo2
[root@ncs-db-1 ~]# cman_tool status
Version: 6.1.0
Config Version: 21
Cluster Name: ncs_cluster
Cluster Id: 27444
Cluster Member: Yes
Cluster Generation: 1796
Membership state: Cluster-Member
Nodes: 2
Expected votes: 1
Total votes: 2
Quorum: 1
Active subsystems: 9
Flags: 2node Dirty
Ports Bound: 0 11 177
Node name: ncs-db-n1
Node ID: 1
Multicast addresses: xxx.xxx.xxx.xxx
Node addresses: xxx.xxx.xxx.xxx
http://www.dbaglobe.com/search/label/Redhat