HANA Scale-Up HA with System Replication & Automated Failover using SUSE HAE on SLES 12 SP 3 – Part 2 | SUSE Communities

HANA Scale-Up HA with System Replication & Automated Failover using SUSE HAE on SLES 12 SP 3 – Part 2

Share
Share

This is a guest blog reposted with the permission of the author Dennis Padia, SAP Technical Consultant & Architect at Larsen and Toubro Infotech.

 

 

 

In Part 1 of this 3 Series blog, an overview on System Replication, SUSE High Availability Extension and a reference architecture was discussed in detail. So based on it, we will now design a solution.

Solution Design

This is the detailed solution design of this reference architecture. It includes the following sections:

  1. Network Design
  2. Solution Design
  3. Planning and Pre-requisites
  4. Setting up System Replication
  5. SUSE HAE Installation & Configuration
  6. SAPHanaSR Installation & Configuration

NOTE: Install the SAP HANA Database along with Host Agent as described in the SAP HANA Server Installation Guide

Network Design

SAP recommends using a dedicated network for system replication. To determine the network requirements for system replication, refer to link here.

Planning and Pre-requisites

It has been assumed that the hardware/server is already setup along with the network connectivity. Before you start setting up SAP HANA system replication, you need to fulfil the following pre-requisites –

  • The primary and secondary system are both installed and configured. You have verified that both are independently up and running.
  • The configuration of hosts in the primary and secondary systems must be the same, that is, the number of hosts must be the same but also the names of the host roles, failover groups and worker groups must be identical in both systems. This implies that if there is a standby host on the primary system it need not be available on the secondary system.
  • Multiple services of the same kind (for example, index servers) on one host are not supported.
  • All configuration steps should be executed on the master name server node only.
  • The software version of the secondary should be equal or newer to the version on the primary.
  • The secondary system must have the same SAP system ID, <SID> and instance number as the primary system.
  • System replication between two systems on the same host is not supported.
  • The .ini file configuration must be similar for both systems. Any changes made manually, or by SQL commands on one system should be manually duplicated on the other system.
  • Automatic configuration parameter checks will alert you to configuration differences between the two systems.
  • To secure the system replication communication channel between the primary and the secondary system configure the ini parameters [system_replication_communication] / listeninterface and allowed_sender as described in Host Name Resolution for System Replication.
  • If the host names of the primary and the secondary system are the same (for example, because two systems are used that have identical host names) change the host names used on the secondary system. For more information, see Rename an SAP HANA System Host.
  • Check that the hostnames in the primary system are different to the hostnames used in the secondary system.
  • You can see this in the SAP HANA studio, at the end of the environment variable SAP_RETRIEVAL_PATH and with the python scriptlandscapeHostConfiguration.py
  • Ensure that log_mode is set to “normal” in the persistence section of the global.ini file. Log mode normal means that log segments are backed up.
  • You are logged on to both systems as the operating system user (user <sid>adm) or you have provided its credentials when prompted.
  • You have performed a data backup or storage snapshot on the primary system. In multiple-container systems, the system database and all tenant databases must be backed up. This is necessary to start creating log backups. Activated log backup is a prerequisite to get a common sync point for log shipping between the primary and secondary system.
  • Prepare the secondary system for authentication by copying the system PKI SSFS.key and the .dat file from the primary system to the secondary system
  • Both systems should run on the same endianness platform

SSFS Authentication

Before setting up the HANA System replication, we first need to prepare secondary system for authentication by copying the system PKI SSFS.key and .dat file from the primary system to the secondary system.

On HANA Server, SSFS .dat and .key is located under /usr/sap/SID/SYS/global/security/rsecssfs/data and /usr/sap/SID/SYS/global/security/rsecssfs/key which you can transfer to secondary system on the same path.

If you don’t copy SSFS file from Primary to Secondary, you will get below error while setting up System Replication

Error Message: Error while executing the register command: hdbnsutil -sr_register

primary and secondary has different systemPKI SSFS data and key or unable to

Setting Up HANA System Replication

Configure Name Resolution for Replication Network

As part of best practices, it is suggested to have dedicated network for HANA System Replication if you are setting up High Availability. For Disaster Recovery, client network can used to setup System Replication.

Additionally, HANA Nodes must be configured to identify the replication network. This must be done before system replication is configured. This is configured in the section system_replication_hostname_resolution in the global.ini file on the configuration tab of SAP HANA Studio.

Configure the replication IP address of the secondary node on the primary node and configure the replication IP address of the primary node on the secondary node. Just for the reference, parameter will look something like below

Here 192.168.100.112 is the replication IP address of secondary server saphanas. Same way in secondary node, you have to configuration same parameter with replication IP address of primary server.

Number of IP address configured for particular host using below command

# ip addr show

Perform Backup

You need to perform a data backup or storage snapshot on the primary system. In multiple-container systems, the system database and all tenant databases must be backed up. This is necessary to start creating log backups. Activated log backup is a prerequisite to get a common sync point for log shipping between the primary and secondary system.

NOTE: If you are creating tenant after setting up system replication, then that tenant will only become a part of system replication after performing it initial data backup.

Similarly, take backup of all tenant database as well.

Setup HSR from Primary Node to Secondary Node

Enable Primary System for System Replication

Right mouse-click on Primary System > Configuration and Monitoring > Configure System Replication. Check the radio button to enable system replication:

Provide Logical Name. It can be anything but follow some naming convention to identify HANA Server and Data Center.

Once you enabled Primary System for replication, shutdown secondary System. You can only register HANA System as secondary only if it down.

Once your Secondary HANA System is down, register it as Secondary

Selection Replication Mode and Operation Mode based on your requirement and approach for business continuity.

It is advisable to use below settings

For High Availability

Replication Mode: Synchronous or Synchronous In-mem

Operation Mode: Logreplay

For Disaster Recovery

Replication Mode: Async

Operation Mode: Delta-datashipping or logreplay

NOTE: If you are setting up multi tier replication, then the operation mode you select from Primary to Secondary will also be the operation mode from Secondary to Tertiary.

As explained in Part 1, you can setup multi-target system replication from HANA 2.0 SPS 03

If everything is fine i.e. if you have transferred SSFS .dat and .key file from Primary to Secondary then you get any error and you can monitor system replication from Landscape > System Replication (HANA Studio)

Run below command with on the primary HANA server as user <sid>adm

# hdbnsutil -sr_state

In next blog, we will discuss on install and configure SUSE HAE to automate the failover process in SAP HANA system replication.

(Note: Part 3 of this series will be posted the week of November 12, 2018)

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

No comments yet

Avatar photo
10,811 views
Michael Tabron I'm a SUSE Product Marketing Manager focused primarily on open source solutions for SAP applications across all platforms. I joined SUSE in 2015, and have over 20 years of experience with hardware and software marketing.