PLANNING FOR INSTALLATION SAP ON AIX HA SYSTEM
In ideal scenario we have to assigned <188.8.131.52> to NODE1 and <184.108.40.206> to NODE2
The virtual IPs assigned to NODE1 <220.127.116.11> and NODE2 is <18.104.22.168>
Scenario: – [Active – Active Cluster]
DB will run on Node A
SAP CI will run on Node B
If node A fails DB will failover to Node B
If node B fails CI will failover to Node A
Shared SAP and DB filesystems are in SAN (Storage area network)
Filesystems will failover accordingly.
SAP NW07 SR3 DVDs
AIX Node A (IP address and virtual IP address; Host Name, Alias-optional)
AIX Node B (IP address and virtual IP address; Host Name, Alias-optional)
HACMP supports node failures. We are not using HACMP to probe Application (SAP/DB) failures. I.e. if SAP or DB process crashes HACMP will not failover the resource groups.
/etc/hosts should have IPs of both nodes
PRD = PRD
Node A hostname: dbserver
Node B hostname: ciserver
Shared file systems
These file systems can be moved/failed over (unmounted/mounted) from one node to another.
Users and Groups will be created by SAPINST.
Please make a note of the UIDs as we have to use the same UIDs and GIDs on other node as well.
User Home directory: – For prdadm please use a home directory on shared disk
For e.g. /usr/sap/PRD/home/prdadm
Use Distributed Installation option in SAPINST
Mount SAP filesystems
Mount DB2 filesystems
Check /etc/hosts that IP of both nodes are available
Ping both nodes and check the IP address
Check output of command ifconfig u2013a and confirm that both IPs are available
Start SAPINST with SAPINST_USE_HOSTNAME option.
For e.f. ./sapinst SAPINST_USE_HOSTNAME=dbserver
Step 1: Global host preparation (this should be easy to finish)
Step 2: Database instance installation (DB install first instead of CI)
During this step note down UIDs and GIDs created by sapinst.
During this step please choose /usr/sap/PRD/home/prdadm as user home for prdadm user.
With SR3 DVDs db2 software will be installed in /db2/PRD/db2_software
Step 3: Install SAP Central Instance with SAPINST_USE_HOSTNAME=ciserver
Stop / Start SAP -> Login and confirm SAP instance is running fine.
Shutdown SAP and DB2
Add entries in .rhosts in home directory on user prdadm and db2prd
For example in /usr/sap/PRD/home/prdadm/.rhots
<IP Address of Node A> prdadm
<IP Address of Node B> prdadm
<all possible IP address> prdadm
Similarly for /db2/db2prd/.rhosts
<IP Address of Node A> db2prd
<IP Address of Node B> db2prd
<all possible IP address> db2prd
Move SAP resources from Node A to B (i.e. SAP filesystems should become available on Node B)
DO NOT MODE DB RESOURCES; Let it stay on Node A alone.
Create /db2/PRD and /db2/db2prd directories (this should have some free space, 10 GB is good to go)
Start SAP installation under Distributed installation option
Step 1: Global host preparation
Temporarily change /etc/hosts and make the IP of dbserver same as ciserver.
dbserver line should be written above ciserver line
- i.e. u2018ping dbserveru2019 and u2018ping ciserveru2019 should return same IP address on Node B (NOT NODE A)
Step 2: Database instance installation with option SAPINST_USE_HOSTNAME=dbserver
During this installation, make sure UIDs and GIDs are given same as in Node A.
You can confirm the UIDs from /etc/passwd and GID from /etc/group
Also, make sure you specify user home for prdadm as /usr/sap/PRD/home/prdadm
Once installation starts ABAP Load and one or two jobs are completed, please cancel the installation.
db2 connect to PRD
It should be successful. This confirms the DB2 is setup properly.
rm u2013r /db2/db2prd/*
rm u2013r /db2/PRD/sapdata1
rm u2013r /db2/PRD/sapdata2
rm u2013r /db2/PRD/sapdata3
rm u2013r /db2/PRD/sapdata4
rm u2013r /db2/PRD/log_dir
rm u2013r /db2/PRD/db2dump
Retain these directories so that you can mount the shared filesystems from Node A to Node B during failover.
Change and correct IP address in /etc/hosts of host dbserver, which we changed temporarily earlier.
Failover DB resources to Node B
Check if all DB2 filesystems are correctly available.
On Node A, check and double confirm that there are no files/directories under /db2 and its subdirectories. i.e. all filesystems have come to Node B.
In our case there was one filesystem /db2/PRD/db2prd which did not come to node B and we had to struggle a lot to find the same.
On Node B, as root
su u2013 db2prd
you should be in /db2/db2prd now
rm ._dbserver (remove the env profile with hostname in the filenames)
su u2013 db2prd (environment should be fine now)
db2 terminate (donu2019t forget this)
db2 connect to PRD
This should be successful (i.e. its good to HACMP)
su u2013 prdadm
su u2013 prdadm
cdpro (you will be in /sapmnt/PRD/profile)
Check and modify DEFAULT.PFL correctly to indicate DB hostname, etc.
R3trans u2013d (this should be successful; SAP is good to start now).
As of now SAP and DB2 resources are available in Node B
SAP should come up
SAP and DB2 should go down.
Move DB2 and SAP resources to Node A
SAP and DB2 should come up
stopsap R3 ciserver
Only SAP should go down
Move SAP resource to Node B
on node B
as sidadm u201C startsap ciserver u201D
SAP should come up.
At this stage DB2 is running on Node A and SAP CI is running on Node B.
We have achieved what we want.