31
INSTALLATION AND CONFIGURATION OF HACMP 5.4.1 CREATING 2 (TWO) NODE CLUSTER Before installing HACMP application, we need to make sure that both nodes are on same version of aix. The best practice is to install and configure applications like websphere and ips on first node and then replicate to 2 nd node. # oslevel -s 6100-06-03-1048 STEPS : 1. smitty chinet to add HB ip address in ODM # smitty chinet

Installation and Configuration of Hacmp 5

Embed Size (px)

Citation preview

Page 1: Installation and Configuration of Hacmp 5

INSTALLATION AND CONFIGURATION OF HACMP 5.4.1

CREATING 2 (TWO) NODE CLUSTER

Before installing HACMP application, we need to make sure that both nodes are on same version of aix.The best practice is to install and configure applications like websphere and ips on first node and then replicate to 2nd node.# oslevel -s6100-06-03-1048

STEPS :

1. smitty chinet to add HB ip address in ODM# smitty chinet

Hit enter and it will assign the 10.10.1.1 to en0, now we need to repeat above steps for en1, as for cluster we need redundant Ethernet.

Page 2: Installation and Configuration of Hacmp 5

# smitty chinet

Hit enter and it will assign the 20.10.1.1 to en1.

2. smitty hostname to set the hostname

# smitty hostname

Page 3: Installation and Configuration of Hacmp 5

3. update the /etc/hosts fileUpdate host file with all your IP’s.In this test lab, we updated hostfile with following info:##################### Heart Beat IPs10.10.1.1 node1-hb120.10.1.1 node1-hb210.10.1.2 node2-hb120.10.1.2 node2-hb2#################### Service IP192.168.1.55 web-svcip#################### Persistent-ips192.168.1.215 node1-pers node1192.168.1.216 node2-pers node2#################### NIM IP192.168.1.77 msraix

# vi /etc/hosts

Page 4: Installation and Configuration of Hacmp 5

4. update the /etc/netsvc.conf file and change the hosts = local, bind

Put entries hosts = local,bind at the end of file.# vi /etc/netsvc.conf

5. update /etc/rc.net with the node persistent ip addressupdate /etc/rc.net with the node persistent ip address under the ifconfig section:/usr/sbin/ifconfig en0 inet 19.3.xx alias up >>$LOGFILE 2>&1

under the route section: /usr/sbin/route add default 192.168.3.1 >>$LOGFILE 2>&1

# vi /etc/rc.net

# shutdown –Fr

- After reboot , will install WEBSPHERE APPLICATION (WAS).- In this lab, we will install WAS from NIM.

# mount msraix:/backup /nfsdir# cd nfsdir# lsAIX.53-12-01.tl.lppsource.2.0.0.0.bff hacmp-fixes-mar1811WAS hacmp54aix-6100-06sp03-1048 hacmp54-sp1aix-6100tl06 imagevio1.databash opensshcd0 openssl

Page 5: Installation and Configuration of Hacmp 5

# cd /nfsdir/WAS/disk1/IHS

To install websphere, make sure xmin server is running and do the following on node:

Following xming windows should pop up:

IF YOUR KEPBOARD IS NOT PROPERLY MAP, THEN TRY TO TYPE FOLLOWING IN AIX:# setxkbmap US -model pc105

Page 6: Installation and Configuration of Hacmp 5

NOW WE CAN INSTALL WEBSPHERE:

# ./install (after running this command it will take little longer to bring WAS pop up)

Page 7: Installation and Configuration of Hacmp 5
Page 8: Installation and Configuration of Hacmp 5
Page 9: Installation and Configuration of Hacmp 5

Hit Finish.

Page 10: Installation and Configuration of Hacmp 5

Now we will create shared volume group.Assign a same hdisk to both nodes in vio1.Go To vio1:$ lsmap –vadapter vhost2

$ lspc -free

$ mkvdev -vdev hdisk5 -vadapter vhost2 -dev webvg-n1webvg-n1 Available$ lsmap –vadapter vhost2

Page 11: Installation and Configuration of Hacmp 5

Now need to add disk to vhos3 for node2:$ lsmap -vadapter vhost3

$ mkvdev -f -vdev hdisk5 -vadapter vhost3 -dev webvg-n2webvg-n2 Available$ lsmap -vadapter vhost3

GO TO NODE1:# lspvhdisk0 00ca1c5e2f79db36 rootvg active# cfgmgr# lspvhdisk0 00ca1c5e2f79db36 rootvg activehdisk1 00ca1c5eac0448eb None

Page 12: Installation and Configuration of Hacmp 5

GO TO NODE2:# lspvhdisk0 00ca1c5e2f7d9866 rootvg active# cfgmgr# lspvhdisk0 00ca1c5e2f7d9866 rootvg activehdisk1 00ca1c5eac0448eb None WE HAVE NOTICED THAT THE PVID: 00ca1c5eac0448eb FOR HDISK2 IN BOTH NODES IS SAME.

Now we will create shared volume group name webvg on hdisk1 on both nodes. Create it on node1, also create some lv and fs.

# lvlstmajor34…Both nodes has same major no.Create concurrent vg using 34 major no.# mkvg -f -c -V 34 -y webvg hdisk1webvgmkvg: This concurrent capable volume group must be varied on manually.# lsvg webvg

In cluster shared volume should not be Auto on to yes, so change Auto on to no.# chvg -an webvg# lsvg webvg

Page 13: Installation and Configuration of Hacmp 5

# lspvhdisk0 00ca1c5e2f79db36 rootvg activehdisk1 00ca1c5eac0448eb webvg active

Run the following commands to create lv, log file and fs in webvg:# mklv -t jfs2 -y webapplv webvg 10 hdisk1# mklv -t jfs2log -y webloglv webvg 1# logform /dev/webloglv# crfs -v jfs2 -d webapplv -Ay -prw -m/webapp -a size=1G

Mount the filesystem# mount /webapp

Page 14: Installation and Configuration of Hacmp 5

Before we copy same webvg on node2, we need to unmounts fs and varyoffvg on node1 and then go to node2 and importvg.Do following on node1:# unmount /webapp# varyoffvg webvg# lspvhdisk0 00ca1c5e2f79db36 rootvg activehdisk1 00ca1c5eac0448eb webvg # lsvg -orootvg#Now go to node2 and do following:# importvg -c -V 36 -y webvg hdisk1

CONFIGURING OF WEBSPHERE

- Create index.html file in webapp folder# cd /webapp# vi index.html- Go to directory /usr/IBM/HTTPServer/conf

- edit httpd.conf# vi httpd.conf

Page 15: Installation and Configuration of Hacmp 5

Edit httpd.conf file for the directory where we save index.html and for the service ip as we described in /etc/hosts file.# ifconfig en0 192.168.1.55 alias up# ifconfig en1 192.168.1.55 alias upRun above command to bind service ip to en0 and en1Go to following directory and run ./apachectl start to start application.# cd /usr/IBM/HTTPServer/bin# ./apachectl startNow go to browser and test with persistent: 192.168.1.216 and service ip:192.168.1.55, if we can look index.html file.

Bring down en0 for node1, and then varyonvg webvg on node2, start apache and test service ip and persistent ip to see if able to access webserver

IT MEANS BOTH NODES ARE PROPERLY CONFIGURED FOR WEBSPHERE.NOW NEED TO INSTALL HACMP APPLICATION ON BOTH NODES.

Page 16: Installation and Configuration of Hacmp 5

INSTALLING HACMP5.4.1 ON NODE1Install the following filesets before installing hacmp

rsct.basic.rtersct.basic.hacmp 2.5.5.0 # Base Level Filesetrsct.compat.basic.hacmp 2.5.5.0 # Base Level Filesetrsct.compat.clients.hacmp 2.5.5.0 # Base Level Fileset

To install these fileset, go to fix central and download aix 6.1TL06

And click continue

Page 17: Installation and Configuration of Hacmp 5

After downloading, move it to the NIM server and export this directory to the required clients.Go to the client and mount exported directory and go to the directory where u kept AIX61TL06 and run smitty install.

Page 18: Installation and Configuration of Hacmp 5

# smitty install

Press F4 or Esc +4 and slect following filesets to install

After selecting above packages, hit enter to continueAccept license to “yes” and hit enter.

Page 19: Installation and Configuration of Hacmp 5

Now we need to go the aix 6.1 base dvd and install following filesets:bos.adt.libm 5.2.0.13 # Fileset Updatebos.adt.syscalls 5.2.0.11 # Fileset Updatebos.clvm.enh 5.2.0.31 # Fileset Updatebos.data 5.1.0.0 # Base Level Filesetrsct.basic.hacmp 2.4.2.0 # Base Level Filesetrsct.basic.rte 2.4.2.0 # Base Level Filesetrsct.basic.sp 2.4.2.0 # Base Level Fileset OPTIONALrsct.exp.cimrm 2.4.2.0 # Base Level Fileset

# smitty install_all

Hit enter and on new screen accept license to “yes” and hit enter again to start installation.

Page 20: Installation and Configuration of Hacmp 5

# shutdown –FrAfter reboot it will degrade AIX TL:# oslevel -s6100-00-02-0750Update TL and reboot# oslevel -s6100-06-01-1043Now need to update SP level to SP3After ypdating sp:# oslevel -s6100-06-03-1048

INSTALL HACMP 5.4Go to hacmp/Installp/ppc directory and rum smitty install_all and select following filesets to install.

Page 21: Installation and Configuration of Hacmp 5

After installing base HACMP, update it with all the fixes and patches. You can get all patches and fixes from Fix Central.After installing and updating fixes and patches, run lslpp –l |grep –I cluster to see if all filesets are committed.

Page 22: Installation and Configuration of Hacmp 5

# cd /etc# vi profileEdit this file with following info:PATH=$PATH:/usr/es/sbin/cluster:/usr/es/sbin/cluster/utilities:/usr/IBM/HTTPServer/binexport PATH

# . profile -- it will refresh this file# apachectl start(68)Can't assign requested address: make_sock: could not bind to address 192.168.1.55:80no listening sockets available, shutting downUnable to open logs# ifconfig en0 192.168.1.55 alias up# varyonvg webvg# mount /webapp# apachectl start

CONFIGURE POWERHABefore starting configuring PowerHA, run following commands on both nodes.# stopsrc -g cluster# stopsrc -s clcomdES# startsrc -s clcomdES# startsrc -g cluster

STEPS ON NODE1Define the ClusterThe first step is to define a cluster. This means nothing more then just define the name of our cluster

# smitty hacmp

Page 23: Installation and Configuration of Hacmp 5

Hit enter to run.

Define the Cluster NodesWe add the first node to our cluster:node1# smitty hacmp

-> Extended Configuration

-> Extended Topology Configuration

-> Configure HACMP Nodes

-> Add a Node to the HACMP Cluster

Add a Node to the HACMP Cluster

Page 24: Installation and Configuration of Hacmp 5

Define a Cluster NetworkThe network topology is used by HACMP for the heartbeat. First we configure heartbeat over ethernet:

node1# smitty hacmp

-> Extended Configuration

-> Extended Topology Configuration

-> Configure HACMP Networks

-> Add a Network to the HACMP Cluster

Add a Communication Interface for HeartbeatBased on the network definition we define the boot addresses as communication interface:node1# smitty hacmp

-> Extended Configuration

-> Extended Topology Configuration

-> Configure HACMP Communication Interfaces/Devices

-> Add Communication Interfaces/Devices

-> Add Pre-defined Communication Interfaces and Devices

-> Communication Interfaces

Page 25: Installation and Configuration of Hacmp 5

STEPS ON NODE2Define the Cluster# smitty hacmp

Page 26: Installation and Configuration of Hacmp 5

Hit enter to run.

Define the Cluster NodesWe add the 2ndt node to our cluster:

Node2# smitty hacmp

-> Extended Configuration

-> Extended Topology Configuration

-> Configure HACMP Nodes

-> Add a Node to the HACMP Cluster

Add a Node to the HACMP Cluster

Add a Communication Interface for HeartbeatBased on the network definition we define the boot addresses as communication interface:

Node2# smitty hacmp

-> Extended Configuration

-> Extended Topology Configuration

-> Configure HACMP Communication Interfaces/Devices

-> Add Communication Interfaces/Devices

-> Add Pre-defined Communication Interfaces and Devices

-> Communication Interfaces

Page 27: Installation and Configuration of Hacmp 5

Add Persistent IP Addresses:

We want to have the IPs belonging to the hostnames of our two nodes to be persistent:

node1# smitty hacmp

-> Extended Configuration

-> Extended Topology Configuration

-> Configure HACMP Persistent Node IP Labels/Addresses

-> Add a Persistent Node IP Label

Add a Persistent Node IP Label/Address

Do same for node2, using ip:192.168.1.216

For application start, use path: /usr/IBM/HTTPServer/bin/apachectl startFor application stop, use path: /usr/IBM/HTTPServer/bin/apachectl stop