Tuesday, March 10, 2015

Linux cluster command line Great Notes

Checking status of the cluster:

# clustat
# clustat -m Display status of and exit
# clustat -s Display status of and exit
# clustat -l Use long format for services
# cman_tool status Show local record of cluster status
# cman_tool nodes Show local record of cluster nodes
# cman_tool nodes -af
# ccs_tool lsnode List nodes
# ccs_tool lsfence List fence devices
# group_tool displays the status of fence, dlm and gfs groups
# group_tool ls displays the list of groups and their membership


Resource Group Control Commands & Locking (for cluster Shutdown / Debugging):

clusvcadm -d Disable/Stop a service
clusvcadm -e Enable/Start a service
clusvcadm -e -F Enable according to failover domain rules
clusvcadm -e -m Enable on
clusvcadm -r -m Relocate to member>
clusvcadm -R Restart a group in place.
clusvcadm -s Stop
clusvcadm -l Lock local resource group manager. This prevents resource groups from starting on the local node.
clusvcadm -S Show lock state
clusvcadm -Z Freeze group in place
clusvcadm -U Unfreeze/thaw group
clusvcadm -u Unlock local resource group manager. This allows resource groups to start on the local node.
clusvcadm -c Convalesce (repair, fix) resource group.Attempts to start failed, non-critical resources within a resource group.
clusvcadm –r -m  ##Move a service to another node
ccs_tool Online management of cluster configuration
ccs_tool ## Update the cluster.conf file across the cluster - update /etc/cluster/cluster.conf
cman_tool Manage cluster nodes and display the current state of the cluster
cman_tool status Display
fence_node # Eject a node from the cluster
fence_tool dump # Print fence debug messages