Skip to content

Commit b93eb02

Browse files
authored
Merge pull request #312844 from Xelu86/drsaphana
[Update] Add secondary sites to a HANA Pacemaker cluster
2 parents 0b57ac8 + 6f9ef3b commit b93eb02

1 file changed

Lines changed: 93 additions & 83 deletions

File tree

articles/sap/workloads/disaster-recovery-sap-hana.md

Lines changed: 93 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,79 @@
11
---
2-
title: Add additional secondary sites to HANA Pacemaker cluster
3-
description: Learn how to extend a highly available SAP HANA solution with additional sites for disaster recovery.
2+
title: Add secondary sites to HANA Pacemaker cluster
3+
description: Learn how to extend a highly available SAP HANA solution with extra sites for disaster recovery.
44
author: msftrobiro
55
ms.author: robiro
66
ms.service: sap-on-azure
77
ms.subservice: sap-vm-workloads
88
ms.topic: how-to
9-
ms.date: 10/29/2024
9+
ms.date: 03/09/2026
1010
ms.custom: template-how-to-pattern
11-
# Customer intent: As an IT administrator, I want to configure additional secondary sites for an existing HANA Pacemaker cluster, so that I can enhance disaster recovery capabilities across multiple Azure regions.
11+
# Customer intent: As an IT administrator, I want to configure secondary sites for an existing HANA Pacemaker cluster, so that I can enhance disaster recovery capabilities across multiple Azure regions.
1212
---
1313

14-
# Add additional secondary sites to a HANA Pacemaker cluster
14+
# Add secondary sites to a HANA Pacemaker cluster
1515

16-
This article describes the requirements and setup for configuring additional secondary HANA replication site to complement an existing Pacemaker cluster. Both SUSE Linux Enterprise Server (SLES) and RedHat Enterprise Linux (RHEL) specifics are covered.
16+
This article describes the requirements and setup for configuring a secondary HANA replication site to complement an existing Pacemaker cluster. Both SUSE Linux Enterprise Server (SLES) and RedHat Enterprise Linux (RHEL) specifics are covered.
1717

1818
## Overview
1919

20-
SAP HANA supports system replication (HSR) with more than two connected sites. You can configure additional sites to an existing HSR pair that Pacemaker manages in a highly available setup. For example, you can deploy these additional sites in a second Azure region for disaster recovery (DR) purposes.
20+
SAP HANA supports system replication (HSR) with more than two connected sites. You can configure more than one site to an existing HSR pair that Pacemaker manages in a highly available setup. For example, you can deploy extra sites in a second Azure region for disaster recovery (DR) purposes.
2121

22-
Pacemaker and the HANA cluster resource agent manage only the first two sites in HSR. The additional sites aren't controlled by the Pacemaker cluster.
22+
Pacemaker and the HANA cluster resource agent manage only the first two sites in HSR. The Pacemaker cluster doesn't control the extra sites.
2323

24-
SAP HANA supports additional secondary sites system replication in two modes:
24+
SAP HANA supports secondary sites system replication in two modes:
25+
26+
- [Multitarget](https://help.sap.com/docs/SAP_HANA_PLATFORM/6b94445c94ae495c83a19646e7c3fd56/ba457510958241889a459e606bbcf3d3.html) replicates data changes from primary to more than one target system. The extra sites are connected to primary replication in a star topology.
2527

26-
- [Multitarget](https://help.sap.com/docs/SAP_HANA_PLATFORM/6b94445c94ae495c83a19646e7c3fd56/ba457510958241889a459e606bbcf3d3.html) replicates data changes from primary to more than one target system. The additional sites are connected to primary replication in a star topology.
2728
- [Multitier](https://help.sap.com/docs/SAP_HANA_PLATFORM/6b94445c94ae495c83a19646e7c3fd56/f730f308fede4040bcb5ccea6751e74d.html) is a cascading, or chained, set up of HANA system replication. The third site connects to the secondary.
2829

2930
For more conceptual details about HANA HSR within one region and across different regions, see [SAP HANA availability across Azure regions](./sap-hana-availability-across-regions.md#combine-availability-within-one-region-and-across-regions).
3031

31-
## Prerequisites for SLES
32+
## Prerequisites
3233

33-
Requirements for additional HSR sites are different for HANA scale-up and HANA scale-out.
34+
Requirements for multiple HSR sites are different for HANA scale-up and HANA scale-out.
3435

3536
> [!NOTE]
3637
>
3738
> - Requirements in this article are only valid for a Pacemaker-enabled landscape. Without Pacemaker, SAP HANA version requirements apply to the chosen replication mode.
38-
> - Pacemaker and the HANA cluster resource agent manage only two sites. The additional HSR site isn't controlled by the Pacemaker cluster.
39+
> - Pacemaker and the HANA cluster resource agent manage only two sites. The Pacemaker cluster doesn't control the extra HSR site.
40+
41+
# [SLES](#tab/sles)
42+
43+
- SUSE supports maximum of one extra system replication site to an SAP HANA database outside the Pacemaker cluster.
3944

40-
- SUSE supports maximum of one additional system replication site to an SAP HANA database outside the Pacemaker cluster.
4145
- **Both scale-up and scale-out**: SAP HANA SPS 04 or newer is required to use multitarget HSR with a Pacemaker cluster.
46+
4247
- **Both scale-up and scale-out**: Maximum of one SAP HANA system replication connected from outside the Linux cluster.
43-
- **HANA scale-out only**: SLES 15 SP1 or higher.
48+
49+
- **HANA scale-out only**: SLES 15 SP1 or later.
50+
4451
- **HANA scale-out only**: Operating system (OS) package SAPHanaSR-ScaleOut version 0.180 or higher.
45-
- **HANA scale-out only**: SAP HANA high-availability (HA) hooks [susHanaSR or SAPHanaSrMultiTarget](./sap-hana-high-availability-scale-out-hsr-suse.md#implement-hana-resource-agents) in use. Older HANA HA hook `SAPHanaSR` isn't multitarget aware for scale-out.
4652

47-
## Prerequisites for RHEL
53+
- **HANA scale-out only**: SAP HANA high-availability (HA) hooks [susHanaSR or SAPHanaSrMultiTarget](./sap-hana-high-availability-scale-out-hsr-suse.md#implement-hana-resource-agents) in use. Older HANA HA hook `SAPHanaSR` isn't multitarget aware for scale-out.
4854

49-
Requirements for additional HSR sites are different for HANA scale-up and HANA scale-out.
55+
# [RHEL](#tab/rhel)
5056

51-
> [!NOTE]
52-
>
53-
> - Requirements in this article are only valid for a Pacemaker-enabled landscape. Without Pacemaker, SAP HANA version requirements apply for the chosen replication mode.
54-
> - Pacemaker and the HANA cluster resource agent manage only two sites. Any additional HSR sites aren't controlled by the Pacemaker cluster.
57+
- RedHat supports one or more system replication sites to an SAP HANA database outside the Pacemaker cluster.
5558

56-
- RedHat supports one or more additional system replication sites to an SAP HANA database outside the Pacemaker cluster.
5759
- **HANA scale-up only**: See RedHat [support policies for RHEL HA clusters](https://access.redhat.com/articles/3397471) for details on the minimum OS, SAP HANA, and cluster resource agents version.
60+
5861
- **HANA scale-out only**: HANA multitarget replication isn't supported on Azure with a Pacemaker cluster.
5962

60-
> [!Tip]
61-
> The configuration illustrates how to setup third site outside Pacemaker cluster. On RHEL, if you have more than one additional sites outside the Pacemaker cluster, you would need to extend the setup to those other sites as well.
63+
> [!TIP]
64+
> The configuration illustrates how to set up third site outside Pacemaker cluster. On RHEL, if you have more than one site outside the Pacemaker cluster, you would need to extend the setup to those other sites as well.
65+
66+
---
6267

6368
## HANA scale-up: Add HANA multitarget system replication for DR purposes
6469

65-
With SAP HANA HA hooks SAPHanaSR/susHanaSR for [SLES](./sap-hana-high-availability.md#implement-hana-resource-agents) and [RHEL](./sap-hana-high-availability-rhel.md#implement-sap-hana-system-replication-hooks), you can add additional sites to HANA system replication. The Pacemaker environment is aware of a HANA multitarget setup.
70+
With SAP HANA HA hooks SAPHanaSR/susHanaSR for [SLES](./sap-hana-high-availability.md#implement-hana-resource-agents) and [RHEL](./sap-hana-high-availability-rhel.md#implement-sap-hana-system-replication-hooks), you can add extra sites to HANA system replication. The Pacemaker environment is aware of a HANA multitarget setup.
71+
72+
Failure of extra sites doesn't trigger any cluster action. The cluster detects the replication status of connected sites and the monitored attribute for the third site can change between `SOK` and `SFAIL` states. Any takeover tests to the extra site or executing your DR exercise process should first place the cluster resources into maintenance mode to prevent any undesired cluster action.
6673

67-
Failure of additional sites doesn't trigger any cluster action. The cluster detects the replication status of connected sites and the monitored attribute for the third site can change between `SOK` and `SFAIL` states. Any takeover tests to the additional site or executing your DR exercise process should first place the cluster resources into maintenance mode to prevent any undesired cluster action.
74+
The following example shows a multitarget system replication system. For more information, see [SAP HANA System Replication Setups](https://help.sap.com/docs/SAP_HANA_PLATFORM/4e9b18c116aa42fc84c7dbfd02111aba/2e6c71ab55f147e19b832565311a8e4e.html).
6875

69-
The following example shows a multitarget system replication system. For more information, see [SAP documentation](https://help.sap.com/docs/SAP_HANA_PLATFORM/4e9b18c116aa42fc84c7dbfd02111aba/2e6c71ab55f147e19b832565311a8e4e.html).
70-
![Diagram that shows an example of a HANA scale-up multitarget system replication system.](./media/sap-hana-high-availability/sap-hana-high-availability-scale-up-hsr-multi-target.png)
76+
![A diagram that shows an example of a HANA scale-up multitarget system replication system.](./media/sap-hana-high-availability/sap-hana-high-availability-scale-up-hsr-multi-target.png)
7177

7278
1. Deploy Azure resources for the third node. Depending on your requirements, you can use a different Azure region for DR purposes.
7379

@@ -79,54 +85,57 @@ The following example shows a multitarget system replication system. For more in
7985
- No HANA HA hook setup for the third site in *global.ini*.
8086

8187
1. Install SAP HANA on the third node.
82-
88+
8389
The same HANA SID and HANA installation number must be used for the third site.
8490

8591
1. With SAP HANA on the third site installed and running, register the third site with the primary site.
8692

8793
The following example uses `SITE-DR` as the name for the third site.
8894

89-
```bash
90-
# Execute on the third site
91-
su - hn1adm
92-
# Register the HANA third site to the primary. Switch --online will shutdown the HANA instance on third site.
93-
hdbnsutil -sr_register --name=SITE-DR --remoteHost=hn1-db-0 --remoteInstance=03 --replicationMode=async --online
94-
```
95+
```bash
96+
# Execute on the third site
97+
su - hn1adm
98+
99+
# Register the HANA third site to the primary. Switch --online will shutdown the HANA instance on third site.
100+
hdbnsutil -sr_register --name=SITE-DR --remoteHost=hn1-db-0 --remoteInstance=03 --replicationMode=async --online
101+
```
95102

96103
1. Verify that the HANA system replication shows the secondary site and the third site.
97104

98-
```bash
99-
# Verify HANA HSR is in sync, execute on primary
100-
sudo su - hn1adm -c "python /usr/sap/HN1/HDB03/exe/python_support/systemReplicationStatus.py"
101-
```
105+
```bash
106+
# Verify HANA HSR is in sync, execute on primary
107+
sudo su - hn1adm -c "python /usr/sap/HN1/HDB03/exe/python_support/systemReplicationStatus.py"
108+
```
102109

103110
1. Check the `SAPHanaSR` attribute for the third site. `SITE-DR` should show up with the status `SOK` in the `Sites` section.
104111

105-
```bash
106-
# Check SAPHanaSR attribute on any cluster managed host (first or second site)
107-
sudo SAPHanaSR-showAttr
108-
# Example result
109-
# Global cib-time maintenance
110-
# --------------------------------------------
111-
# global Tue Feb 21 19:28:21 2023 false
112-
#
113-
# Sites srHook
114-
# -----------------
115-
# HN1-SITE1 PRIM
116-
# HN1-SITE2 SOK
117-
# SITE-DR SOK
118-
```
112+
```bash
113+
# Check SAPHanaSR attribute on any cluster managed host (first or second site)
114+
sudo SAPHanaSR-showAttr
115+
# Example result
116+
# Global cib-time maintenance
117+
# --------------------------------------------
118+
# global Tue Feb 21 19:28:21 2023 false
119+
#
120+
# Sites srHook
121+
# -----------------
122+
# HN1-SITE1 PRIM
123+
# HN1-SITE2 SOK
124+
# SITE-DR SOK
125+
```
119126

120127
The cluster detects the replication status of connected sites. The monitored attributes can change between `SOK` and `SFAIL`. There's no cluster action if the replication to the DR site fails.
121128

122129
## HANA scale-out: Add HANA multitarget system replication for DR purposes
123130

124-
With the SAP HANA HA providers [susHanaSR or SAPHanaSrMultiTarget](./sap-hana-high-availability-scale-out-hsr-suse.md#implement-hana-resource-agents), you can add a third HANA scale-out site. This third site is often used for DR in another Azure region. The Pacemaker environment is aware of a HANA multitarget DR setup. This section applies to systems running Pacemaker on SUSE only. See the "Prerequisites" section in this document for details.
131+
With the SAP HANA HA providers [susHanaSR or SAPHanaSrMultiTarget](./sap-hana-high-availability-scale-out-hsr-suse.md#implement-hana-resource-agents), you can add a third HANA scale-out site. This third site is often used for DR in another Azure region. The Pacemaker environment is aware of a HANA multitarget DR setup. This section applies to systems running Pacemaker on SUSE only. See the "Prerequisites" section in this document for details.
125132

126133
Failure of the third node doesn't trigger any cluster action. The cluster detects the replication status of connected sites and the monitored attribute for the third site can change between the `SOK` and `SFAIL` states. Any takeover tests to the third/DR site or executing your DR exercise process should first place the cluster resources into maintenance mode to prevent any undesired cluster action.
127134

128-
The following example shows a multitarget system replication system. For more information, see [SAP documentation](https://help.sap.com/docs/SAP_HANA_PLATFORM/4e9b18c116aa42fc84c7dbfd02111aba/2e6c71ab55f147e19b832565311a8e4e.html).
129-
![Diagram that shows an example of a HANA scale-out multitarget system replication system.](./media/sap-hana-high-availability/sap-hana-high-availability-scale-out-hsr-multi-target.png)
135+
The following example shows a multitarget system replication system. For more information, see
136+
[SAP HANA System Replication Setups](https://help.sap.com/docs/SAP_HANA_PLATFORM/4e9b18c116aa42fc84c7dbfd02111aba/2e6c71ab55f147e19b832565311a8e4e.html).
137+
138+
![A diagram that shows an example of a HANA scale-out multitarget system replication system.](./media/sap-hana-high-availability/sap-hana-high-availability-scale-out-hsr-multi-target.png)
130139

131140
1. Deploy Azure resources for the third site. Depending on your requirements, you can use a different Azure region for DR purposes.
132141

@@ -145,48 +154,49 @@ The following example shows a multitarget system replication system. For more in
145154

146155
The following example uses `SITE-DR` as the name for the third site.
147156

148-
```bash
149-
# Execute on the third site
150-
su - hn1adm
151-
# Register the HANA third site to the primary. Switch --online will shutdown the HANA instance on third site.
152-
hdbnsutil -sr_register --name=SITE-DR --remoteHost=hana-s1-db1 --remoteInstance=03 --replicationMode=async --online
153-
```
157+
```bash
158+
# Execute on the third site
159+
su - hn1adm
160+
161+
# Register the HANA third site to the primary. Switch --online will shutdown the HANA instance on third site.
162+
hdbnsutil -sr_register --name=SITE-DR --remoteHost=hana-s1-db1 --remoteInstance=03 --replicationMode=async --online
163+
```
154164

155165
1. Verify that the HANA system replication shows the secondary site and the third site.
156166

157-
```bash
158-
# Verify HANA HSR is in sync, execute on primary
159-
sudo su - hn1adm -c "python /usr/sap/HN1/HDB03/exe/python_support/systemReplicationStatus.py"
160-
```
167+
```bash
168+
# Verify HANA HSR is in sync, execute on primary
169+
sudo su - hn1adm -c "python /usr/sap/HN1/HDB03/exe/python_support/systemReplicationStatus.py"
170+
```
161171

162172
1. Check the `SAPHanaSR` attribute for the third site. `SITE-DR` should show up with the status `SOK` in the `Sites` section.
163173

164-
```bash
165-
# Check SAPHanaSR attribute on any cluster managed host (first or second site)
166-
sudo SAPHanaSR-showAttr
167-
# Expected result
168-
# Global cib-time maintenance prim sec sync_state upd
169-
# ---------------------------------------------------------------------
170-
# HN1 Fri Jan 27 10:38:46 2023 false HANA_S1 - SOK ok
171-
#
172-
# Sites lpt lss mns srHook srr
173-
# ------------------------------------------------
174-
# SITE-DR SOK
175-
# HANA_S1 1674815869 4 hana-s1-db1 PRIM P
176-
# HANA_S2 30 4 hana-s2-db1 SOK S
177-
```
174+
```bash
175+
# Check SAPHanaSR attribute on any cluster managed host (first or second site)
176+
sudo SAPHanaSR-showAttr
177+
# Expected result
178+
# Global cib-time maintenance prim sec sync_state upd
179+
# ---------------------------------------------------------------------
180+
# HN1 Fri Jan 27 10:38:46 2023 false HANA_S1 - SOK ok
181+
#
182+
# Sites lpt lss mns srHook srr
183+
# ------------------------------------------------
184+
# SITE-DR SOK
185+
# HANA_S1 1674815869 4 hana-s1-db1 PRIM P
186+
# HANA_S2 30 4 hana-s2-db1 SOK S
187+
```
178188

179189
The cluster detects the replication status of connected sites. The monitored attribute can change between `SOK` and `SFAIL`. There's no cluster action if the replication to the DR site fails.
180190

181191
## Autoregister the third site
182192

183193
During a planned or unplanned takeover event between the two Pacemaker cluster sites, HSR to the third site is also interrupted. Pacemaker doesn't modify HANA replication to the third site.
184194

185-
SAP provides since the HANA 2 SPS 04 parameter `register_secondaries_on_takeover`. With the parameter set to the value `true`, after the HSR takeover between cluster sites 1 and 2, HANA registers the third site on the new primary automatically to keep an HSR multitarget setup. Configure the HANA parameter `register_secondaries_on_takeover = true` that's configured in the `[system_replication]` block of *global.ini* on both SAP HANA sites in the Linux cluster. Both SITE1 and SITE2 need the parameter in the respective HANA *global.ini* configuration file. The parameter can also be used outside a Pacemaker cluster.
195+
SAP provides the parameter `register_secondaries_on_takeover` beginning with HANA 2 SPS 04. With the parameter set to the value `true`, after the HSR takeover between cluster sites 1 and 2, HANA registers the third site on the new primary automatically to keep an HSR multitarget setup. Configure the HANA parameter `register_secondaries_on_takeover = true` in the `[system_replication]` block of *global.ini* on both SAP HANA sites in the Linux cluster. Both SITE1 and SITE2 need the parameter in the respective HANA *global.ini* configuration file. The parameter can also be used outside a Pacemaker cluster.
186196

187197
For HSR [multitier](https://help.sap.com/docs/SAP_HANA_PLATFORM/6b94445c94ae495c83a19646e7c3fd56/f730f308fede4040bcb5ccea6751e74d.html), no automatic SAP HANA registration of the third site exists. You need to manually register the third site to the current secondary to keep the HSR replication chain for multitier.
188198

189-
![Diagram flow that shows how a HANA autoregistration works with a third site during a takeover.](./media/sap-hana-high-availability/sap-hana-high-availability-hsr-third-site-auto-register.png)
199+
![A diagram that shows how HANA auto-registration works with a third site during a takeover.](./media/sap-hana-high-availability/sap-hana-high-availability-hsr-third-site-auto-register.png)
190200

191201
## Next steps
192202

0 commit comments

Comments
 (0)