SAP HANA Hands on tests ( part 2 ) : HANA DB Standby
In a previous blog I showed a brief overview on SAP HANA installation on VMWare ESXi ( SAP HANA Hands on tests ( part 1 ) : HANA DB installation ) .
I had one hana box installed with an HANA DB running on it and an SAP ECC EHP7 instance also ( not a recommended set up ) :
Now, I have replicated my first box using VMWare functionnalities, cleaned up the HDB and ECC on it in order to have a brand new hana box.
The setup is the same.
I have configured the nfs beetween my 2 boxes ( hdbtest1 and hdbtest2 ).
Lets configure the Hana replication standby:
Mount /hana directory from hdbtest1 to hdbtest2 :
Install the required hana software on the scaleout node using the embedded hdblcm tool.
This time I use the hdblcm “text mode” ( a bit R3setup notalgic 😉 ) :
SAP HANA Lifecycle Management – SAP HANA 1.00.82.00.394270
HTL /hana/shared/HTL HDB_ALONE
HDB00 version: 1.00.82.00.394270 host: froxhdbtest plugins: lcapps,afl
Enter Root User Name [root]:
Enter Root User Password:
Collecting information from host ‘froxhdbtest2’…
Information collected from host ‘froxhdbtest2’.
Index | Listen Interface | Description
1 | global | The HANA services will listen on all network interfaces
2 | internal | The HANA services will only listen on a specific network interface
NOTE : for testing purpose I selected option 1. But on a production setup I’d probably use a dedicated NIC in order to put the Hana inter processes communication on a dedicated network.
Select Listen Interface / Enter Index :
Enter System Administrator (htladm) Password:
Enter Certificate Host Name For Host ‘froxhdbtest2’ [froxhdbtest2]:
Summary before execution:
Add Additional Hosts to SAP HANA System
Add Hosts Parameters
Installation Path: /hana/shared
SAP HANA System ID: HTL
Install SSH Key: Yes
Root User Name: root
Listen Interface: global
Enable the installation or upgrade of the SAP Host Agent: Yes
Certificate Host Names: froxhdbtest2
Storage Partition: <<assign automatically>>
Do you want to continue? (y/n): y
Adding additional host to SAP HANA Database…
Adding additional host…
Adding host ‘froxhdbtest2’…
Registering HANA Lifecycle Manager on remote hosts…
Regenerating SSL certificates on remote hosts…
Deploying Host agent configurations on remote hosts…
Updating Component List…
SAP HANA system : Add hosts finished successfully.
Log file written to ‘/var/tmp/hdb_hdblcm_add_hosts_2015-03-06_14.47.56/hdblcm.log’.
Now you have an additional host ready to take over in case of first node failure :
Of course in this particular case where the hdbtest also holds the HDB storage, I would run into trouble if I totally lose it.
So I will revert the roles : hdbtest2 will be master and hdbtest will be slave :
Now let’ s play with the standby feature :
I have my ERP instance running with an sgen run going on in order to have some load.
Here is the HDB system status before the poweroff :
I poweroff the hdbtest2.
We can see the system hdbtest2 going down. The hana admin console shows some error messages :
The work processes on the ECC instance are switching to reconnect status, and the transaction are being rolledback :
The hdbtest1 host should take the lead after a while.
Now the Master host is lost on hdbtest2 following the poweroff, we can see the hdbIndexserver initializing on hdbtest1:
The services are now started on the hdbtest1.
In My ECC instance I can see the work processes have reconnected to the HDB.
The ECC server got out of the reconnect status. The system is available again after a few minutes.
The SGEN is of course canceled but I can resume it :
ECC is O.K. The database is available through the hdbtest1 node which was the former standby host.
We can see the hdbtest2 is seen as Inactive.
Now we can restart the hdbtest2 host. No fallback should happen.
This is also O.K. The HDB continues to work on hdbtest1. Host hdbtest2 is back in the set up.
We are now fully back online.
The system was out for only a few minutes.
The test is O.K.
The next step will be to apply patches using this set up.