Chapter 3. Installing SAP HANA for a 2-node HA cluster setup
3.1. Installing a scale-up SAP HANA instance
Install the HANA instance with the same SID and instance number on all nodes. The setup of the instances must be identical.
Prerequisites
- You have identical systems installed according to the OS requirements.
- You have prepared the details for your HANA instances, see SAP HANA planning.
- You have downloaded the SAP HANA installation media from SAP Software Downloads and the media is available on each node.
Procedure
Go to the directory which contains the installation media, for example
/sapmedia/hana
:cd /sapmedia/hana
[root]# cd /sapmedia/hana
Copy to Clipboard Copied! Unpack the installation media:
unzip IMDB_SERVER20_*.ZIP
[root]# unzip IMDB_SERVER20_*.ZIP
Copy to Clipboard Copied! Go into the path of the unpacked installation media:
cd /sapmedia/hana/DATA_UNITS/HDB_LCM_LINUX_<arch>
[root]# cd /sapmedia/hana/DATA_UNITS/HDB_LCM_LINUX_<arch>
Copy to Clipboard Copied! Run the SAP HANA Lifecycle Management tool (HDBLCM) for an interactive installation:
./hdblcm
[root]# ./hdblcm
Copy to Clipboard Copied! In the interactive mode the installer asks you for all the required information, including the System ID (SID), Installation Number (instance), the filesystem location of data and log volumes, and more.
- Repeat steps 1-4 on all nodes.
Verification
Switch to the
<sid>adm
user:su - rh1adm
[root]# su - rh1adm
Copy to Clipboard Copied! Check the HANA instance runtime information as user
<sid>adm
:rh1adm $ HDB info USER PID PPID %CPU VSZ RSS COMMAND rh1adm 17897 17895 0.0 8972 5248 -sh rh1adm 24461 17897 0.0 7524 3840 \_ /bin/sh /usr/sap/RH1/HDB02/HDB info rh1adm 24490 24461 0.0 10104 3456 \_ ps fx -U rh1adm -o user:8,pid:8,ppid:8,pcpu:5,vsz:10,rss:10,args rh1adm 12924 1 0.0 581456 40072 hdbrsutil --start --port 34203 --volume 3 --volumesuffix ... rh1adm 12284 1 0.0 581376 40000 hdbrsutil --start --port 34201 --volume 1 --volumesuffix ... rh1adm 12193 1 0.0 9028 3028 sapstart pf=/usr/sap/RH1/SYS/profile/RH1_HDB02_node1 rh1adm 12200 12193 0.0 476372 87652 \_ /usr/sap/RH1/HDB02/node1/trace/hdb.sapRH1_HDB02 -d -nw -f /usr/sap/RH1/HDB02/node1/daemon.ini pf=/usr/sap/RH1/SYS/profile/RH1_HDB02_node1 rh1adm 12222 12200 9.6 19986956 16126960 \_ hdbnameserver rh1adm 12787 12200 0.3 1464980 214468 \_ hdbcompileserver rh1adm 12790 12200 94.0 7669612 6970948 \_ hdbpreprocessor rh1adm 12828 12200 12.7 19716232 14994012 \_ hdbindexserver -port 34203 rh1adm 12831 12200 1.1 4995088 1465724 \_ hdbxsengine -port 34207 rh1adm 13269 12200 0.4 2660096 461776 \_ hdbwebdispatcher rh1adm 12016 1 0.0 499404 58336 /usr/sap/RH1/HDB02/exe/sapstartsrv pf=/usr/sap/RH1/SYS/profile/RH1_HDB02_node1
rh1adm $ HDB info USER PID PPID %CPU VSZ RSS COMMAND rh1adm 17897 17895 0.0 8972 5248 -sh rh1adm 24461 17897 0.0 7524 3840 \_ /bin/sh /usr/sap/RH1/HDB02/HDB info rh1adm 24490 24461 0.0 10104 3456 \_ ps fx -U rh1adm -o user:8,pid:8,ppid:8,pcpu:5,vsz:10,rss:10,args rh1adm 12924 1 0.0 581456 40072 hdbrsutil --start --port 34203 --volume 3 --volumesuffix ... rh1adm 12284 1 0.0 581376 40000 hdbrsutil --start --port 34201 --volume 1 --volumesuffix ... rh1adm 12193 1 0.0 9028 3028 sapstart pf=/usr/sap/RH1/SYS/profile/RH1_HDB02_node1 rh1adm 12200 12193 0.0 476372 87652 \_ /usr/sap/RH1/HDB02/node1/trace/hdb.sapRH1_HDB02 -d -nw -f /usr/sap/RH1/HDB02/node1/daemon.ini pf=/usr/sap/RH1/SYS/profile/RH1_HDB02_node1 rh1adm 12222 12200 9.6 19986956 16126960 \_ hdbnameserver rh1adm 12787 12200 0.3 1464980 214468 \_ hdbcompileserver rh1adm 12790 12200 94.0 7669612 6970948 \_ hdbpreprocessor rh1adm 12828 12200 12.7 19716232 14994012 \_ hdbindexserver -port 34203 rh1adm 12831 12200 1.1 4995088 1465724 \_ hdbxsengine -port 34207 rh1adm 13269 12200 0.4 2660096 461776 \_ hdbwebdispatcher rh1adm 12016 1 0.0 499404 58336 /usr/sap/RH1/HDB02/exe/sapstartsrv pf=/usr/sap/RH1/SYS/profile/RH1_HDB02_node1
Copy to Clipboard Copied! Additionally, you can verify the
landscapeHostConfiguration.py
output for status ok:rh1adm $ cdpy; python landscapeHostConfiguration.py | Host | Host | Host | Failover | Remove | Storage | Storage | Failover | Failover | NameServer | NameServer | IndexServer | IndexServer | Host | Host | Worker | Worker | | | Active | Status | Status | Status | Config | Actual | Config | Actual | Config | Actual | Config | Actual | Config | Actual | Config | Actual | | | | | | | Partition | Partition | Group | Group | Role | Role | Role | Role | Roles | Roles | Groups | Groups | | ----- | ------ | ------ | -------- | ------ | --------- | --------- | -------- | -------- | ---------- | ---------- | ----------- | ----------- | ------ | ------ | ------- | ------- | | node1 | yes | ok | | | 1 | 1 | default | default | master 1 | master | worker | master | worker | worker | default | default | overall host status: ok
rh1adm $ cdpy; python landscapeHostConfiguration.py | Host | Host | Host | Failover | Remove | Storage | Storage | Failover | Failover | NameServer | NameServer | IndexServer | IndexServer | Host | Host | Worker | Worker | | | Active | Status | Status | Status | Config | Actual | Config | Actual | Config | Actual | Config | Actual | Config | Actual | Config | Actual | | | | | | | Partition | Partition | Group | Group | Role | Role | Role | Role | Roles | Roles | Groups | Groups | | ----- | ------ | ------ | -------- | ------ | --------- | --------- | -------- | -------- | ---------- | ---------- | ----------- | ----------- | ------ | ------ | ------- | ------- | | node1 | yes | ok | | | 1 | 1 | default | default | master 1 | master | worker | master | worker | worker | default | default | overall host status: ok
Copy to Clipboard Copied! -
Repeat the steps on all nodes. Note that the HANA profiles contain the individual node name in the format
<SID>_HDB<instance>_<node>
.
3.2. Disabling SAP HANA instance autostart
The cluster controls startup and shutdown of the HANA instance in a HA cluster setup. You must configure the HANA instance profile to not automatically start the instance itself.
Procedure
Go to the HANA instance profile directory:
cd /usr/sap/<SID>/SYS/profile
[root]# cd /usr/sap/<SID>/SYS/profile
Copy to Clipboard Copied! Edit the instance profile:
vi <SID>_HDB<instance>_<hostname>
[root]# vi <SID>_HDB<instance>_<hostname>
Copy to Clipboard Copied! Ensure that
Autostart
is set to0
.- Repeat steps 1-2 for each HANA instance that will be managed as part of the HA cluster.
Verification
Check that
Autostart = 0
is set in the instance profiles of all HANA instances that will be managed by the HA cluster:grep Autostart /usr/sap/RH1/SYS/profile/*
[root]# grep Autostart /usr/sap/RH1/SYS/profile/* /usr/sap/RH1/SYS/profile/RH1_HDB02_node1:Autostart = 0
Copy to Clipboard Copied!