Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Wednesday, 23 October 2013

HACMP/PowerHA


PowerHA/SystemMirror

PowerHA implementation steps

PowerHA Limits 



ComponentMaximum number/other limits
Nodes32
Resource groups64
Networks48
Network interfaces, devices, and labels256
Cluster resourcesWhile 128 is the maximum that clinfo can handle, there can be more in the cluster
Parent-Child dependenciesMax of 3 levels
Site2
Interfaces7 interfaces per node per network
Application monitors per site128
Persistent IP aliasOne per node per network
XD_data networks4 per cluster
GLVM ModesSynchronous, Asynchronous, non concurrent
GLVM DevicesAll PVs supported by AIX, no need to be same local and remote

 Log Files



FileDescription
/var/hacmp/adm/cluster.logGenerated by cluster scripts and daemons
/var/hacmp/log/hacmp.outGenerated by event scripts and utilities
/var/hacmp/adm/history/cluster.mmddyyyyCluster history files generated daily
/var/hacmp/clcomd/clcomd.logGenerated by clcomd daemon
/var/hacmp/clcomd/clcomddiag.logGenerated by clcomd daemon, debug information
/var/hacmp/clverify/clverify.logGenerated by Cluster Verification utility
/var/hacmp/log/autoverify.logGenerated by Auto Verify and Synchronize
/var/hacmp/log/clavan.logGenerated by Application Availability Analysis tool
/var/hacmp/log/clinfo.logGenerated by client node running clinfo
/var/hacmp/log/cl_testtool.logGenerated by the Cluster Test Tool
/var/hacmp/log/clconfigassist.logGenerated by Two-Node Cluster Configuration Assistant
/var/hacmp/log/clstrmgr.debugGenerated by the clstrmgr daemon
/var/hacmp/log/clstrmgr.debug.longDetail information from the clstrmgr daemon
/var/hacmp/log/clutils.logGenerated by cluster utilities and file propagation
/var/hacmp/log/cspoc.logGenerated by CSPOC commands
/var/hacmp/log/cspoc.log.remoteDetail information from CSPOC commands
/var/hacmp/log/migration.logGenerated by cluster migration
/var/hacmp/log/sa.logGenerated by Application Discovery
"odmget HACMPlogs"Displays a complete list of HACMP Log Files
/var/ha/log/topsvcs.defaultTopology Services starup configuration log.
/var/ha/log/topsvcs.dd.hhmmss.langTopology Services start/stop log
/var/ha/log/topsvcs.dd.hhmmssTopology Services activity log
/var/ha/log/nim.topsvcs.IF.clusternameNIM hearthbeat activity log for each interface.
/var/ha/log/nmDiag.topsvcs.IF.clusterNIM diagnostic log for each interface.
/var/ha/log/grpsvcs.default.nodenum_instnumGroup Services startup log
/var/ha/log/grpsvcs_nodenum_instnumGroup Services activity log.
  
Useful HACMP Commands
 
CommandPurpose
clstatDisplays topology and resource groups status.
clinfoES and snmpd must be running.
cldumpDisplays topology & resource group status and configuration.
snmpd must be running.
cldispLike cldump, but application oriented.
snmpd must be running.
cltopinfo (cllsif)Displays topology configuration.
clRGinfo (clfindres)Displays resource group status.
clsshowresDisplays resource groups configuration.
clshowsrvCalls lsrsc to display status of:
HACMP subsystems (clshowrsrv -a)
HACMP and RSCT subsystems (clshowsrv -v)
clcycleRotates selected log files.
clgetactivenodesDisplays active nodes.
Must specify which nodo to ask (-n node)
clsnapSave HACMP log files and configuration information.
cl_ls_shared_vgsList shared vgs.
cl_lsfsList shared fs.
cllsgrpList the resource groups.
cllsresShow short resource group information.
clRGmoveBrings a RG Offline/Online or move it
lssrc -ls clstrmgrESDisplays Cluster Services


Notes:

Installation changes 
The following AIX configuration changes are made: 

1. Files modified:
/etc/hosts
/etc/inittab
/etc/rc.net
/etc/services
/etc/snmpd.conf
/etc/snmpd.peers
/etc/syslog.conf
/etc/trcfmt
/var/spool/cron/crontab/root  

2. The hacmp group is added.  

3. Also, using cluster configuration and verification, the file /etc/hosts can be changed by adding or modifying entries. 

4. The following network options are set to “1” by RSCT topsvcs startup:
- nonlocsrcroute
- ipsrcrouterecv
- ipsrcroutesend
- ipsrcrouteforward

- ip6forwarding

5. The verification utility ensures that the value of each network option is consistent across all cluster nodes for the following settings:
- tcp_pmtu_discover
- udp_pmtu_discover
- ipignoreredirects
- routerevalidate


The cluster communications daemon
With the introduction of clcomdES, there is no need for an /.rhosts file to be configured. The cluster communications daemon is started by inittab, with the entry being created by the installation of PowerHA. The daemon is controlled by the system resource controller, so startsrc, stopsrc and refresh work. In particular, refresh is used to re-read /usr/es/sbin/cluster/etc/rhosts and moving the log files. The cluster communication daemon uses port 6191.


Resource group components:
Service IP Label
Volume Group
Filesystem
Application Server
NFS mounts
NFS exports



Resource group Startup options:
Online on home node only.
Online on first available node.
Online on all available nodes.
Online using distribution policy.


Resource group Fallover options:
Fall over to next priority node in list:
Fallover using dynamic node priority:
Bring offline (on error only)

Resource group Fallback options:
Fall back to higher priority node in list
Never fall back

Resource group attributes
Settling time
Delayed fallback timers
Distribution policy
Dynamic node priorities
Resource group processing order
Priority override location
Resource group dependencies - parent / child
Resource group dependencies - location


Resource Groups operations 
Bring a resource group offline
Bring a resource group online
Move a resource group to another node/site
Suspend/resume application monitoring


Sources of HACMP information
HACMP manuals come with the product –READ THEM!
Sales Manual: www.ibm.com/common/ssi
/usr/es/sbin/cluster/release_notes
IBM courses:
– HACMP Administration I: Planning and Implementation (AU54/Q1554)
– HACMP Administration II: Administration and Problem Determination (AU61/Q1561)
– HACMP V5 Internals (AU60/Q1560)
IBM Web Site:
– http://www-03.ibm.com/systems/p/ha/
Non-IBM sources (not endorsed by IBM but probably worth a look):
– http://www.matilda.com/hacmp/
– http://groups.yahoo.com/group/hacmp/

hardware Management Console (HMC)


.: AIX Hardware Installation Using HMC CLI :.


1. Log in to the HMC
> ssh hscroot@hmc

2. Identify the Managed System were you need to work:
> lssyscfg -r sys -F name

3. Verify the Managed System status:
> lssyscfg -m "managed-system" -r sys -F name:state

4. Verify the status of the LPARs on the Managed System:
> lssyscfg -m "managed-system" -r lpar -F name:state

5. List processors, memory and IO on HMC managed system (system/lpar)
> MEM: lshwres -r mem -m "managed-system" --level sys ; lshwres -r mem -m "managed-system" --level lpar
> PROC: lshwres -r proc -m "managed-system" --level sys ; lshwres -r proc -m "managed-system" --level lpar
> IO: lshwres -r io --rsubtype slot -m "managed-system" -F "description,lpar_name" ; lshwres -r io -m "managed-system" --level lpar

6. Take a profile backup
> mksyscfg -r prof -m "managed-system" -o save -p "lpar" -n newProfile
Then you can see new profile from GUI or command line.
> lssyscfg -r prof -m "managed-system" --filter lpar_names="lpar"

7. Shutdown an LPAR using the operating system:
> chsysstate -m  "managed-system" -r "lpar" -n "partition-name" -o shutdown

8. Verify the status of the LPARs on the Managed System:
> lssyscfg -m "managed-system" -r lpar -F name:state

9. Power off a managed system (all the LPARs need to be down):
> chsysstate -m "managed-system" -r sys -o off

10. Verify the Managed System status:
> lssyscfg -m "managed-system" -r sys -F name:state

11. Install Hardware: 

12. Power on a managed system:
> chsysstate -m managed-system -r sys -o on

13. List processors, memory and IO on HMC managed system (system/lpar) to validate.
> MEM: lshwres -r mem -m "managed-system" --level sys ; lshwres -r mem -m "managed-system" --level lpar
> PROC: lshwres -r proc -m "managed-system" --level sys ; lshwres -r proc -m "managed-system" --level lpar
> IO: lshwres -r io --rsubtype slot -m "managed-system" -F "description,lpar_name" ; lshwres -r io -m "managed-system" --level lpar

14. Assign the resources to the profile
> MEM: chsyscfg -r prof -m  "managed-system" -i "name=$profile1,lpar_name=$partition3,min_mem=X,desired_mem=X,max_mem=X"
> PROC: chsyscfg -r prof -m  "managed-system" -i "name=$profile1,lpar_name=$partition3,min_procs-=X,desired_procs-=X,max_procs-=X"
> IO: chhwres -r io -m o a -p -l (DLPAR)

15. Activate an LPAR:
chsysstate -m  "managed-system" -r "lpar" -n "partition-name" -o on

16. Verify the status of the LPARs on the Managed System:
> lssyscfg -m "managed-system" -r lpar -F name:state

17. Exit

Performance Management




Performance Analysis Tools

CPUMemoryI/ONetwork
vmstat, iostatvmstatiostatlsattr
pslspsvmstatnetstat, entstat
sarsvmonlspsnfsstat
trace, trcrpt, trussfilemonlsattrnetpmon
tprof, gprof, proftrace, trcrpt, trusslspv, lslv, lsvgifconfig
time, timextopas, nmonfilemoniptrace, ipreport
netpmon, curt, splatlparstatlvmstattcpdump
locktracefileplacetrace, trcrpt, truss
emstat, alstattrace, trcrpt, trussnfs4cl
topas, nmontopas, nmontopas, nmon
lparstat, mpstat, smtctllsdev

Performance Tunning Tools

CPUMemoryI/ONetwork
nice, renicevmovmono
schedoiooioo, lvm0nfso
bindprocess, bindintcpuchps, mkpschlvifconfig
chdevchdevchdevchdev
wlmwlmmigratepv
wparwparreorvg