Monday, December 21, 2009

Useful HACMP Commands

Advanced 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 193.9.200.2  255.255.255.0     To list the network for ip 193.9.200.2, netmask 255.255.255.0

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



HACMP LOGS

=========

/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)



***************

9 comments:

  1. Nice summary...thanks

    ReplyDelete
  2. HI praveen
    Your site is so good. Do you have any matrial for AIX except reed book please.... send to me kumarrksunix@gmail.com

    ReplyDelete
  3. /usr/es/sbin/cluster/utility/* (All commands) --> This is wrong I think...

    The correct one is --> /usr/es/sbin/cluster/utilities/*

    ReplyDelete
  4. Hi, Is there a file where you can set a flag so that the cluster wouldn't fail over? Say, if I remove the cross mount FS and cluster thinks it is unstable even after fixing issue, can we change a permission of a script or a status flag to prevent a fail over?

    ReplyDelete
  5. As you mentioned any resource modification in a resource group will cause a cluster fail over
    To avoid this ,either you have to make the cluster in one node (2 node cluster),or you have to remove the resource from resource group.So modification of a resource (eg:- File system) will not impact your cluster

    Any monitoring program on the resource will also have an impact on resources ,so keep that thing in mind also

    All the comment I have written is from my point of view

    May be there is a possibility of setting a flag as you mentioned

    ReplyDelete
  6. good work,surely it will help to new guys to AIX...

    ReplyDelete
  7. helps immensely...thankyou

    ReplyDelete
  8. Useful information dude..Thank you...

    ReplyDelete
  9. i've 2 purge the file cluster.log HACMP bcz i can't backing up this file when i'm using the command MKSYSB . plz could u help m ?

    ReplyDelete