SAPHanaSR(7)
π¦ SAPHanaSR(7) β basic cluster config, but make it cute π¦
okay so bestie, this is SAPHanaSR(7) and we're talking the SAP HANA System Replication scale-up basic cluster configuration. Part 1 starts now, no cap. π
β¨ NAME β¨
SAPHanaSR_basic_cluster β SAP HANA System Replication scale-up basic cluster configuration. π«Ά
π DESCRIPTION π
The SAP HANA System Replication scale-up scenario needs a certain basic cluster configuration. Besides these necessary settings, some additional configurations might match specific needs. Adapting a few SAP HANA settings might be beneficial as well. πΈ
π§ CRM basics π§
default-resource-stickiness = 1000β this crm basic parameter defines the 'stickiness' score a resource gets on the node where it is currently running. It prevents the cluster from moving resources around without an urgent need during a cluster transition. The correct value depends on number of resources, colocation rules and resource groups. Particularly additional groups colocated to the HANA primary master resource can affect cluster decisions. Too high value might prevent not only unwanted but also useful actions. This is because SAPHanaSR uses an internal scoring table for placing the HANA roles on the right nodes. Mandatory, default 1.failure-timeout = 86400β this crm basic parameter defines how long failed actions will be kept in the CIB. After that time the failure record will be deleted. The time is measured in seconds. See alsomigration-thresholdbelow. Optional, no default.migration-threshold = 5000β this crm basic parameter defines how many errors on a resource can be detected before this resource will be migrated to another node. See alsofailure-timeout. Mandatory, default 3.record-pending = trueβ the op_defaultrecord-pendingdefines whether the intention of an action upon the resource is recorded in the Cluster Information Base (CIB). Setting this parameter to'true'allows the user to see pending actions like'starting'and'stopping'incrm_monand Hawk. Optional, default false.pcmk_delay_max = 30β the sbd stonith parameterpcmk_delay_maxdefines an upper limit for waiting before a fencing/stonith request will be triggered. This parameter should prevent the cluster from unwanted double fencing in case of split-brain. A value around 30 seconds is required in two-node clusters, except priority fencing is used. Mandatory, default 5.priority-fencing-delay = 30β the optional crm propertypriority-fencing-delayspecifies a delay for the fencings that are targeting the lost nodes with the highest total resource priority in case we do not have the majority of the nodes in our cluster partition, so that the more significant nodes potentially win any fencing match. That's especially meaningful under split-brain of a 2-node cluster. A promoted resource instance takes the base priority + 1 on calculation if the base priority is not 0. Any delay that are introduced bypcmk_delay_maxconfigured for the corresponding fencing resources will be added to this delay. A meta attributepriority=100or alike for theSAPHanaControllerprimitive resource is needed to make this work. Seeocf_suse_SAPHanaController(7). The delay should be significantly greater than, or safely twice,pcmk_delay_max. Optional, no default.
π sbd service basics π
SBD_STARTMODE=cleanβ the sbd daemon parameterSBD_STARTMODEin/etc/sysconfig/sbddefines whether the sbd daemon starts automatically after a node has been fenced. The value"clean"tells sbd to start only if the node was not previously fenced. This does not work for diskless sbd. See manual pagesbd(8)andstonith_sbd(7)for details.
βοΈ systemd basics βοΈ
saphostagent.service enabled
SAP${SID}_${INO}.service enabled
In case systemd-style init is used for the HANA database, the services saphostagent and SAP${SID}_${INO} need to be enabled and running inside the SAP slice. The instance profile Autostart feature needs to be off. The service saptune is highly recommended, see manual page saptune(8). β¨
π pacemaker service dependency to SAP instance service π
[Unit]
Wants=SAP${SID}_${INO}.service
After=SAP${SID}_${INO}.service
In case systemd-style init is used for the HANA database, it might be desired to have the SAP instance service stopping after pacemaker at system shutdown. Therefore a drop-in file for the pacemaker service might help. See examples below. π«Ά
π pacemaker service basics π
PCMK_fail_fast = yesβ the parameterPCMK_fail_fastin/etc/sysconfig/pacemakerspecifies how pacemaker reacts on failures of its subdaemons. Default"no"means to restart failed subdaemons, while"yes"means fencing the node. Setting"yes"might help to avoid undefined situations. Optional, default no.
π SAP HANA basics π
/usr/sap/${SID}/SYS/global/hdb/custom/config/global.ini
[memorymanager]
final_memory_release_shutdown = [ auto | on | off ]
final_memory_release_crash = [ auto | on | off ]
Starting with SAP HANA 2.0 SPS06, the database shutdown can be accelerated by optimising memory de-allocation. Please refer to SAP documentation before setting this parameters. π
/usr/sap/${SID}/SYS/global/hdb/custom/config/daemon.ini
[daemon]
terminationtimeout = [ millisec ]
forcedterminationtimeout = [ millisec ]
The first parameter defines the timeout from sending SIGTERM to finally terminating child processes when HANA is shutting down by the STOP event. Used also as maximal delay in system restart if 'restartterminationtimeout' parameter is not set. The second defines the timeout from sending the SIGTERM to finally terminating child processes when HANA is shutting down by the QUIT event. Please refer to SAP documentation before setting this parameters. π§
β¨ EXAMPLES β¨
Okay so, examples time! This is where SAPHanaSR gets iconic β every snippet here is a lilβ recipe, and the vibes are immaculate. π«Ά
πΈ crm basic configuration
Hereβs an example crm basic configuration for SAPHanaSR. These are the specific parameters that are needed; some general parameters are left out, iykyk. The following example is for 15 SP5 with disk-based SBD:
property cib-bootstrap-options: \
have-watchdog=true \
cluster-infrastructure=corosync \
cluster-name=hacluster \
stonith-enabled=true \
placement-strategy=balanced \
stonith-timeout=144 \
rsc_defaults rsc-options: \
resource-stickiness=1000 \
migration-threshold=3 \
failure-timeout=86400
op_defaults op-options: \
timeout=600 \
record-pending=true
πΈ crm simple SBD stonith configuration on SLE 15
To complete the SBD setup, you gotta activate SBD as the STONITH/fencing mechanism in the CIB. SBD is normally used for SAPHanaSR scale-up instead of any other fencing/stonith mechanism. Example for a basic disk-based SBD resource on SLE 15:
primitive rsc_stonith_sbd stonith:external/sbd \
params pcmk-delay-max=30
πΈ crm simple SBD stonith configuration on SLE 16
Same energy, new era: to complete the SBD setup, itβs necessary to activate SBD as the STONITH/fencing mechanism in the CIB. SBD is normally used for SAPHanaSR scale-up instead of any other fencing/stonith mechanism. Example for a basic disk-based SBD resource on SLE 16:
primitive rsc_stonith_sbd stonith:fence_sbd \
params pcmk-delay-max=30
πΈ crm priority fencing SBD stonith configuration on SLE 15
Example for a priority fencing disk-based SBD resource β lowkey spicy, fr fr:
primitive rsc_stonith_sbd stonith:external/sbd \
params pcmk-delay-max=15 \
property cib-bootstrap-options: \
priority-fencing-delay=30
πΈ crm simple IP address resource configuration
Let the Linux cluster manage one IP address and move that address along with the HANA primary master nameserver. Interval and timeout are set for friendly conditions. π
primitive rsc_ip_SLE_HDB00 IPaddr2 \
op monitor interval=10 timeout=20 \
params ip=192.168.178.188
colocation col_ip_with_SLE_HDB00 \
2000: rsc_ip_SLE_HDB00:Started mst_SAPHanaCon_SLE_HDB00:Promoted
πΈ crm protective IP address resource configuration
Let the Linux cluster manage one IP address. This resource should tolerate a short absence of (virtual) network cards. If a monitor and the resulting start fails, the node should get fenced. This protects against the risk of HANA dual-primary. A colocation constraint between this IP address resource and the HANA primary master nameserver is needed as well β see the respective examples. π
primitive rsc_ip_SLE_HDB00 IPaddr2 \
op monitor interval=30 timeout=60 \
op start timeout=90 on-fail=fence \
params ip=192.168.178.188 cidr_netmask=32
This configuration might be used in public cloud environments where virtual NICs might be expected to disappear temporarily. Of course, it would be better to not let NICs disappear in production. I.e. by adding redundancy to the network or by setting the cluster into maintenance.
πΈ crm IP address for active/active read-enabled resource configuration
Let the Linux cluster manage an additional IP address and move that address along with the HANA secondary master nameserver. Example SID is SLE, instance number 00.
primitive rsc_ip_ro_SLE_HDB00 IPaddr2 \
op monitor interval=10 timeout=20 \
params ip=192.168.178.199
colocation col_ip_ro_secondary_SLE_HDB00 \
2000: rsc_ip_ro_SLE_HDB00:Started mst_SAPHanaCon_SLE_HDB00:Unpromoted
location loc_ip_ro_master_SLE_HDB00 \
rsc_ip_ro_SLE_HDB00 \
rule -inf: hana_sle_roles ne master1:master:worker:master
πΈ crm grouped IP address resource configuration
Let the Linux cluster manage one IP address and move that address along with the HANA primary master nameserver. An auxiliary resource is needed for a specific public cloud purpose. β¨
β οΈ You should not bind a resource to the HANA master role. This would change the effective resource scoring and might prevent the cluster from taking expected actions. If, for any reason, you need to bind an additional resource to the HANA resource, you need to reduce that additional resourceΒ΄s stickiness to 1.
primitive rsc_ip_SLE_HDB00 IPaddr2 \
op monitor interval=10s timeout=20s \
params ip=192.168.178.188 cidr_netmask=32
primitive rsc_lb_SLE_HDB00 azure-lb \
params port=62502
group grp_ip_SLE_HDB00 rsc_lb_SLE_HDB00 rsc_ip_SLE_HDB00 \
meta resource-stickiness=1
colocation col_ip_with_SLE_HDB00 \
8000: grp_ip_SLE_HDB00:Started mst_SAPHanaCon_SLE_HDB00:Promoted
πΈ crm MailTo resource configuration
You could define a MailTo resource that informs you as soon as the score for the promoted instance of the SAPHanaController resource changes. See also manual pages SAPHanaSR-showAttr(8) and ocf_heartbeat_MailTo(7). Example SID is HA1, instance number is 10.
primitive rsc_mailto_HA1_HDB10 MailTo \
params email="root@localhost" subject="master-
rsc_SAPHanaCon_HA1_HDB10 changed." \
op monitor timeout=10 interval=30 depth=0 \
location loc_mailto_HA1_HDB10_with_primary rsc_mailto_HA1_HDB10 \
rule 2000: master-rsc_SAPHanaCon_HA1_HDB10 eq 150
πΈ check how resource stickiness affects promotion scoring
SAPHanaSR uses an internal scoring table. The promotion scores for HANA primary and secondary master are in a certain range. The scores used by the Linux cluster should be in the same range. π
# SAPHanaSR-showAttr | grep master.:master
# crm_simulate -Ls | grep promotion
πΈ clean up SDB stonith resource after write failure
In rare cases the SBD stonith resource fails writing to the block device. After the root cause has been found and fixed, the failure message can be cleaned.
# stonith_admin --cleanup --history=<originator_node>
πΈ check saphostagent and show SAP instances
Basic check for the saphostagent β lilβ wellness check for your SAP stack. π©Ί
# /usr/sap/hostctrl/exe/saphostctrl -function Ping
# /usr/sap/hostctrl/exe/saphostctrl -function ListInstances
πΈ check systemd services for the HANA database
In case systemd-style init is used for the HANA database, the services can be checked. Example SID is HA1, instance number is 10.
# systemctl list-unit-files | grep -i sap
# systemctl status SAPHA1_10.service
# systemd-cgls -u SAP.slice
# systemd-cgls -u SAPHA1_10.service
# systemctl show SAPHA1_10.service
πΈ show pacemaker service drop-in file
In case systemd-style init is used for the HANA database, it might be desired to have the SAP instance service stopping after pacemaker at system shutdown. A drop-in file might help. Example SID is S07, instance number is 00.
# cat /etc/systemd/system/pacemaker.service.d/00-pacemaker.conf
[Unit]
Description=pacemaker needs SAP instance service
Documentation=man:SAPHanaSR_basic_cluster(7)
Wants=SAPS07_00.service
After=SAPS07_00.service
πΈ check for pacemaker dependency to SAP instance service
Example SID is S07, instance number is 00.
# systemctl show pacemaker.service | grep SAPS07_00
# systemd-delta | grep pacemaker
# systemd-analyze dot | grep "pacemaker.*SAPS07_00"
πΈ check running pacemakerd daemon for PCMK_ settings
No output means default, which is f.e. PCMK_fail_fast=no. See /etc/sysconfig/pacemakerd for details.
# cat /proc/$(pgrep pacemakerd)/environ | tr '\0' '\n' | grep PCMK_
πΈ check what SBD_ settings pacemakerd knows from running sbd daemon
No output means default. See /etc/sysconfig/sbd for details.
# cat /proc/$(pgrep pacemakerd)/environ | tr '\0' '\n' | grep SBD_
πΈ check for pacemaker IPC timeouts
Copy this exactly, bestie β yes, the path in the manual literally says messags. No cap, thatβs whatβs written. π
# grep "pacemaker-.*unresponsive.to.ipc" /var/log/messags
π FILES π
/var/lib/pacemaker/pengine/pe-*.bzβ pacemaker CIB snapshot files/var/log/crmsh/crmsh.logβ crm shell log/var/log/messagesβ general system log/var/log/pacemaker/pacemaker.logβ pacemaker log
π BUGS π
In case of any problem, please use your favourite SAP support process to open a request for the component BC-OP-LNX-SUSE. Please report any other feedback and suggestions to feedback@suse.com. π«Ά
π SEE ALSO π
ocf_suse_SAPHanaTopology(7)ocf_suse_SAPHanaController(7)ocf_suse_SAPHanaFilesystem(7)ocf_heartbeat_IPaddr2(7)ocf_heartbeat_MailTo(7)fence_sbd(8)sbd(8)stonith_sbd(7)stonith_admin(8)crm_no_quorum_policy(7)crm(8)crm_simulate(8)SAPHanaSR(7)SAPHanaSR-showAttr(7)corosync.conf(5)votequorum(5)nfs(5)mount(8)systemctl(1)systemd-cgls(1)systemd-analyze(1)systemd-delta(1)ha_related_suse_tids(7)ha_related_sap_notes(7)https://documentation.suse.com/sbp/sap/https://documentation.suse.com/sles-sap/https://www.suse.com/support/kb/https://www.clusterlabs.org
π AUTHORS π
A.Briel, F.Herschel, L.Pinne.
π COPYRIGHT π
(c) 2018 SUSE Linux GmbH, Germany. (c) 2019-2026 SUSE LLC
For details see the GNU General Public License at http://www.gnu.org/licenses/gpl.html.
And thatβs the whole manual page, bestie: SAPHanaSR(7), dated 30 Oct 2025. Periodt. π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: SAPHanaSR-angi 1.3.4-160000.1.1 Β· GPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms