Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Bill Miller
Instructor - IBM Training
Objectives
At the end of this presentation, you should be
able to:
• Describe the functions that HACMP provides
• Plan an HACMP implementation
• Configure HACMP to make an application
highly available
HACMP Architecture
• Redundant Hardware / Duplicate systems
• Eliminate Single Points of Failure (SPOF)
IP VG
APP
IP VG
APP
Network Planning
• Multiple NICs per system in same VLAN/ broadcast domain
– Using same subnet mask, different subnets
– Addresses must be in /etc/hosts on each HACMP node
• IP address “moved” via IPAT
– IP Address Takeover
• Aliasing (recommended, requires Gratuitous ARP)
• Replacement (Hardware Address Takeover possible)
• Non-IP network(s) “required”
Network Configuration
• Use smitty chinet to place addresses on interfaces
– Common netmask, different subnets for each NIC pair
• Addressing shown is for IPAT via Aliasing
– Service address would have to be on one of the boot subnets for IPAT
via Replacement
• Create an Enhanced Concurrent Mode Volume Group for your non-
IP network
Netmask = 255.255.255.0
Storage Planning
• Systems that will provide highly available application
must all have access to LUNs containing all
application data
– Enhanced Concurrent Mode Volume Groups allow for faster
disk takeover
• Unique names must be used for all shared LVM
components
• Pay attention to:
– PVIDs
– Multi-pathing software
– Driver/Firmware/Microcode/HACMP code levels
• Decide where software will be installed
– Non-shared disk (internal to each server)
– Shared disk (one place to update and maintain)
Storage Configuration
• Use standard AIX commands
– Can use C-SPOC once networking is defined
Create the VG on first node Import VG on other nodes
#mkvg -y‘appvg' -s'16' '-n' -V'100' '-C' hdisk3 #importvg -V100 -y appvg hdisk3
#mklv -y‘app10lv' -t'jfs2' appvg 10 #chvg -an appvg
#crfs -v jfs2 -d‘app10lv' -m'/app10‘ #varyoffvg appvg
#unmount /app10
#varyoffvg appvg
Netmask = 255.255.255.0
appvg
Application Considerations
• All components of application must be started
and stopped via scripts
– No manual intervention
• Write and test scripts, then define to HACMP
• Strongly recommend HACMP Application
Monitors
• May need to implement pre/post-event scripts
• HACMP Smart Assists can help
– Only certain applications at this time
Cluster Creation
• Initialization and Standard Configuration Method is
recommended
• Multiple steps, on one node
– Create Cluster, Node and Networks
– Define Service Address(es)
– Define Application Server(s)
– Define Resource Group(s)
– Define resources in Resource Group(s)
– Verify and Synchronize to other nodes
– Start Cluster Services and verify resource acquisition
[Entry Fields]
* Cluster Name [ibmcluster]
Configuration Assistants
Configure an HACMP Cluster and Nodes
Configure Resources to Make Highly Available
Configure HACMP Resource Groups
[Entry Fields]
* IP Label/Address [] +
* Network Name [] +
+--------------------------------------------------------------------------+
¦ IP Label/Address ¦
¦ ¦
¦ Move cursor to desired item and press Enter. ¦
¦ ¦
¦ (none) ((none)) ¦
¦ n1adm (10.1.10.1) ¦
¦ n1adm (10.1.10.2) ¦
¦ xweb (10.1.10.5) ¦
¦ ¦
¦ ¦
¦ F1=Help F2=Refresh F3=Cancel ¦
¦ F8=Image F10=Exit Enter=Do ¦
¦ /=Find n=Find Next ¦
+--------------------------------------------------------------------------+
[Entry Fields]
* IP Label/Address [xweb] +
* Network Name [net_ether_01] +
[Entry Fields]
* Server Name [xwebserver]
* Start Script [/usr/local/scripts/startxweb]
* Stop Script [/usr/local/scripts/stopxweb]
+----------------------------------------------------------------------+
¦ Select a Resource Group ¦
¦ ¦
¦ Move cursor to desired item and press Enter. ¦
¦ ¦
¦ xwebgroup ¦
| ywebgroup ¦
¦ ¦
¦ F1=Help F2=Refresh F3=Cancel ¦
¦ F8=Image F10=Exit Enter=Do ¦
¦ /=Find n=Find Next ¦
+----------------------------------------------------------------------+
[Entry Fields]
Custom Resource Group Name xwebgroup
Participating Node Names (Default Node Priority) n1 n2
Configuration Assistants
Configure an HACMP Cluster and Nodes
Configure Resources to Make Highly Available
Configure HACMP Resource Groups
[Entry Fields]
* Start now, on system restart or both now +
Start Cluster Services on these nodes [n1,n2] +
* Manage Resource Groups Automatically +
BROADCAST message at startup? true +
Startup Cluster Information Daemon? true +
Ignore verification errors? false +
Automatically correct errors found during Interactively +
cluster start?
Cluster Status
• Daemon status
# lssrc –ls clstrmgrES
• Look for ST_STABLE, may need to run multiple times to ensure
state is not changing
• Resource Group status
# clRGinfo
• Expect what state Resource Groups should be in, validate that
• Node status
– clstat
– WebSMIT
– SNMP
Node: n1 State: UP
Interface: n1boot1 (2) Address: 192.168.1.1
State: UP
Interface: n1boot2 (2) Address: 192.168.2.1 First three rules
State: UP
Interface: n1_hdisk5_01 (0) Address: 0.0.0.0 1. patience
State: UP
Interface: xweb (2) Address: 10.1.5.10 2. patience
State: UP
Resource Group: xwebgroup State: On line 3. patience
Also consider using the cldump command. This relies solely on SNMP to get the
current cluster status.
31 © 2007 IBM Corporation
IBM STG Technical Conference
[Entry Fields]
* Stop now, on system restart or both now +
Stop Cluster Services on these nodes [usa] +
BROADCAST cluster shutdown? true +
* Select and Action on Resource Groups Bring Resource Groups> +
+--------------------------------------------------------------------------+
¦ Shutdown mode ¦
¦ ¦
¦ Move cursor to desired item and press Enter. ¦
¦ ¦
¦ Bring Resource Groups Offline ¦
¦ Move Resource Groups ¦
¦ Unmanage Resource Groups ¦
¦ ¦
¦ F1=Help F2=Refresh F3=Cancel ¦
F1¦ F8=Image F10=Exit Enter=Do ¦
F5¦ /=Find n=Find Next ¦
F9+--------------------------------------------------------------------------+
32 © 2007 IBM Corporation
IBM STG Technical Conference
n2 # clstat -a
clstat - HACMP Cluster Status Monitor
n1 # lssrc -ls clstrmgrES
-------------------------------------
Current state: ST_INIT
Cluster: ibmcluster (1156578448)
Wed Aug 30 10:44:20 2006
State: UP Nodes: 2
SubState: STABLE
Same three rules apply
Node: n1
Interface: usaboot1 (2)
State: DOWN
Address: 192.168.1.2
1. patience
Interface: usaboot2 (2)
State: DOWN
Address: 192.168.2.2
2. patience
State: DOWN 3. patience
n1 # tail -1 /tmp/clstrmgr.debug
Wed Aug 30 10:31:54 code is 0 - exhale our dying breath and count on the good graces of SRC to reincarnate us !
33 © 2007 IBM Corporation
IBM STG Technical Conference
Summary
• It’s not easy, but it’s not brain surgery
• Proper planning is important
• Document your intent and keep the document
current
• Test, test, test