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.

Monday 4 July 2011

STEPS TO CONFIGURE HACMP:

STEPS TO CONFIGURE HACMP:

1. Install the nodes, make sure the redundancy is maintained for power supplies, n/w and

fiber n/ws. Then Install AIX on the nodes.

2. Install all the HACMP filesets except HAview and HATivoli.

Install all the RSCT filesets from the AIX base CD.

Make sure that the AIX, HACMP patches and server code are at the latest level (ideally

recommended).

4. Check for fileset bos.clvm to be present on both the nodes. This is required to make the

VGs enhanced concurrent capable.

5. V.IMP: Reboot both the nodes after installing the HACMP filesets.

6. Configure shared storage on both the nodes. Also in case of a disk heartbeat, assign a

1GB shared storage LUN on both nodes.

7. Create the required VGs only on the first node. The VGs can be either normal VGs or

Enhanced concurrent VGs. Assign particular major number to each VGs while creating

the VGs. Record the major no. information.

To check the Majar no. use the command:

ls –lrt /dev grep

Mount automatically at system restart should be set to NO.


8. Varyon the VGs that was just created.

9. V.IMP: Create log LV on each VG first before creating any new LV. Give a unique

name to logLV.

Destroy the content of logLV by: logform /dev/loglvname

Repeat this step for all VGs that were created.

10. Create all the necessary LVs on each VG.

11. Create all the necessary file systems on each LV created…..you can create mount pts

as per the requirement of the customer,

Mount automatically at system restart should be set to NO.

12. umount all the filesystems and varyoff all the VGs.

13. chvg –an All VGs will be set to do not mount automatically at

System restart.

14. Go to node 2 and run cfgmgr –v to import the shared volumes.

15. Import all the VGs on node 2

use smitty importvg import with the same major number as assigned on node

16. Run chvg –an for all VGs on node 2.

17. V.IMP: Identify the boot1, boot2, service ip and persistent ip for both the nodes and make the entry

in the /etc/hosts.

18. Define cluster name.

19. Define the cluster nodes. #smitty hacmp -> Extended Configuration -> Extended topology

configuration -> Configure an HACMP node - > Add a node to an HACMP cluster Define both the

nodes on after the other.


20. Discover HACMP config: This will import for both nodes all the node info, boot ips,

service ips from the /etc/hosts

smitty hacmp -> Extended configurations -> Discover hacmp related information

Step21 Adding Communication interface

Add HACMP communication interfaces. (Ether interfaces.)

smitty hacmp -> Extended Configuration -> Extended Topology Configuration ->

Configure HACMP networks -> Add a network to the HACMP cluster.

Select ether and Press enter.

Then select diskhb and Press enter. Diskhb is your non-tcpip heartbeat.

step 22 Adding device for Disk Heart Beat

Include the interfaces/devices in the ether n/w and diskhb already defined.

smitty hacmp -> Extended Configuration -> Extended Topology Configuration ->

Configure HACMP communication interfaces/devices -> Add communication Interfaces/devices.

step23 Adding boot IP & Disk heart beat information

Include all the four boot ips (2 for each nodes) in this ether interface already defined.Then include the

disk for heartbeat on both the nodes in the diskhb already defined

step 24 Adding persistent IP

Add the persistent IPs:




smitty hacmp -> Extended Configuration -> Extended Topology Configuration ->

Configure HACMP persistent nodes IP label/Addresses

step 25 Adding Persistent IP labels

Add a persistent ip label for both nodes.

step 26 Defining IP labels

Define the service IP labels for both nodes.

smitty hacmp -> Extended Configuration -> Extended Resource Configuration ->

HACMP extended resource configuration -> Configure HACMP service IP label

step 27 Adding Resource Group

Add Resource Groups:

smitty hacmp -> Extended Configuration -> Extended Resource Configuration ->

HACMP extended resource group configuration

Continue similarly for all the resource groups.

The node selected first while defining the resource group will be the primary owner of

that resource group. The node after that is secondary node.




Make sure you set primary node correctly for each resource group. Also set the failover/fallback policies

as per the requirement of the setup

step 28 Setting attributes of Resource group

Set attributes of the resource groups already defined:

Here you have to actually assign the resources to the resource groups.

smitty hacmp -> Extended Configuration -> Extended Resource Configuration ->

HACMP extended resource group configuration

step 29 Adding IP label & RG owned by Node

Add the service IP label for the owner node and also the VGs owned by the owner node

Of this resource group.

step 30 & 31 Synchronize & start Cluster

Synchronize the cluster:

This will sync the info from one node to second node.

Smitty cl_sync

That’s it. Now you are ready to start the cluster.

Smitty clstart


You can start the cluster together on both nodes or start individually on each node.

You can start the cluster together on both nodes or start individually on each node.

Step 32 & 33 Check for cluster Stabilize & VG varied on

Wait for the cluster to stabilize. You can check when the cluster is up by following

commands

a. netstat –i

b. ifconfig –a : look-out for service ip. It will show on each node if the cluster is up.

Check whether the VGs under cluster’s RGs are varied-ON and the filesystems in the

VGs are mounted after the cluster start.

Here test1vg and test2vg are VGs which are varied-ON when the cluster is started and

Filesystems /test2 and /test3 are mounted when the cluster starts.

/test2 and /test3 are in test2vg which is part of the RG which is owned by this node.

32. Perform all the tests such as resource take-over, node failure, n/w failure and verify

the cluster before releasing the system to the customer.

Specifying the default gateway on a specific interface



When you're using HACMP, you usually have multiple network adapters installed and thus multiple

network interface to handle with. If AIX configured the default gateway on a wrong interface (like on

your management interface instead of the boot interface), you might want to change this, so network

traffic isn't sent over the management interface. Here's how you can do this:

First, stop HACMP or do a take-over of the resource groups to another node; this will avoid any

problems with applications when you start fiddling with the network configuration.

Then open up a virtual terminal window to the host on your HMC. Otherwise you would loose the

connection, as soon as you drop the current default gateway.

Now you need to determine where your current default gateway is configured. You can do this by

typing: lsattr -El inet0 and netstat -nr. The lsattr command will show you the current default gateway

route and the netstat command will show you the interface it is configured on. You can also check the

ODM: odmget -q"attribute=route" CuAt.

Now, delete the default gateway like this:

lsattr -El inet0 | awk '$2 ~ /hopcount/ { print $2 }' | read GW

chdev -l inet0 -a delroute=${GW}

If you would now use the route command to specifiy the default gateway on a specific interface, like

this:

route add 0 [ip address of default gateway: xxx.xxx.xxx.254] -if enX

You will have a working entry for the default gateway. But... the route command does not change

anything in the ODM. As soon as your system reboots; the default gateway is gone again. Not a good

idea.

A better solution is to use the chdev command:



chdev -l inet0 -a addroute=net,-hopcount,0,,0,[ip address of default gateway]

This will set the default gateway to the first interface available.

To specify the interface use:

chdev -l inet0 -a addroute=net,-hopcount,0,if,enX,,0,[ip address of default gateway]

Substitute the correct interface for enX in the command above.

If you previously used the route add command, and after that you use chdev to enter the default

gateway, then this will fail. You have to delete it first by using route delete 0, and then give the chdev

command.

Afterwards, check with lsattr -El inet0 and odmget -q"attribute=route" CuAt if the new default gateway

is properly configured. And ofcourse, try to ping the IP address of the default gateway and some outside

address. Now reboot your system and check if the default gateway remains configured on the correct

interface. And startup HACMP again!

No comments:

Post a Comment