Sunday, December 11, 2011

Useful HACMP Commands

clstart -m -s -b -i -l           To start cluster daemons (m-clstrmgr, s-clsmuxpd, b-broadcast message, -i-clinfo, -l cllockd)

clstop -f -N           To force shutdown cluster immediately without releasing resources

clstop -g -N            To do graceful shutdown immediately with no takeover

clstop -gr -N            To do graceful shutdown immediately with takeover 

cldare  -t                To sync the cluster toplogy 

cldare -t -f            To do the mock sync of topology

cldare -r                To sync the cluster resources

cldare -r -f            To do the mock sync of resources

clverify                cluster verification utility

cllscf                To list clustur topology information

cllsclstr                To list the name and security level of the cluster

cllsnode                To list the info about the cluster nodes

cllsnode -i node1            To list info about node1

cllsdisk -g shrg            To list the PVID of the shared hard disk for resource group shrg

cllsnw                To list all cluster networks

cllsnw -n ether1            To list the details of network ether1

cllsif                To list the details by network adapter

cllsif -n node1_service        To list the details of network adapter node1_service

cllsvg                To list the shared vgs which can be accessed by all nodes

cllsvg -g sh1            To list the shared vgs in resource group sh1

cllslv                 To list the shared lvs 

cllslv -g sh1            To list the shared lvs in the resource group sh1

cllsdisk -g sh1            To list the PVID of disks in  the resource group sh1

cllsfs                To list the shared  file systems 

cllsfs -g sh1            To list the shared file systems in the resource group sh1

cllsnim                Show info about all network modules

cllsnim -n ether            Show info about ether network module

cllsparam -n node1        To list the runtime parameters for the node node1

cllsserv                To list all the application servers

claddclstr -i 3 -n dcm         To add a cluster definition with name dcm and id 3

claddnode             To add an adapter

claddnim            To add network interface module

claddgrp -g sh1 -r cascading -n n1 n2       To create resource group sh1 with nodes n1,n2 in cascade

claddserv -s ser1 -b /usr/start -e /usr/stop       Creates an application server ser1 with startscript as /usr/start and stop script as /usr/stop

clchclstr -i 2 -n dcmds          To change cluster definitions name to dcmds and id to 2
clchclstr -s enhanced        To change the clustur security to enhanced

clchnode            To change the adapter parameters

clchgrp                To change the resource group name or node relationship

clchparam            To change the run time parameters (like verbose logging)

clchserv                To change the name of app. server or change the start/end scripts

clrmclstr                To remove the cluster definition

clrmgrp -g sh1            To delete the resource group sh1 and related resources

clrmnim    ether            To remove the network interface module ether

clrmnode -n node1        To remove the node node1

clrmnode -a node1_svc        To remove the adapter named node1_svc

clrmres -g sh1            To remove all resources from resource group sh1

clrmserv  app1            To remove the application server app1

clrmserv ALL            To remove all applicaion servers

clgetactivenodes -n node1        To list the nodes with active cluster manager processes from cluster manager on node node1

clgetaddr node1            returns a pingable address from node node1

clgetgrp -g sh1            To list the info about resource group sh1

clgetgrp -g sh1 -f nodes        To list the participating nodes in the resource group sh1

clgetif                To list interface name/interface device name/netmask associated with a specified ip label / ip address of a specific node

clgetip sh1            To get the ip label associated to the resource group

clgetnet     To list the network for ip, netmask

clgetvg -l nodelv            To list the VG of LV nodelv

cllistlogs            To list the logs

clnodename -a node5           To add node5 to the cluster

clnodename -o node5 -n node3       To change the cluster node name node5 to node3

clshowres            Lists resources defined for all resource group

clfindres                To find the resource group within a cluster

xclconfig             X utility for cluster configuration

xhacmpm            X utility for hacmp management

xclstat                X utility for cluster status


/tmp/hacmp.out        Detailed event script output logged in 7 day rolling history

/var/adm/cluster.log      High level view of cluster events (No clean up on this file)

/usr/sbin/cluster/history/cluster.mmdd    Day by day view of cluster events. (one file / day of month)

/tmp/cm.log        Clstrmgr messages

/tmp/cspoc.log           Output from C-SPOC commands (similar to smit.log)

/tmp/emuhacmp.out    Output from event emulation

rdist  -b -f  /etc/disfile1       To distribute the files in disfile1 to all nodes in disfile1 in binary mode

Sample entry for disfile1
            HOSTS = ( root@node1 root@node3 )
            FILES = ( /etc/passwd /etc/security/passwd)
            ${FILES} -> ${HOSTS}

/usr/es/sbin/cluster/utility/*   (All commands)