Scroll to navigation

ocf_suse_SAPStartSrv(7) OCF resource agents ocf_suse_SAPStartSrv(7)


SAPStartSrv - Manages sapstartsv for a single SAP instance as an HA resource.


SAPStartSrv [ start | stop | status | monitor | meta-data | validate-all | usage ]


SAPStartSrv is a resource agent for managing the sapstartsrv process for a single SAP instance as an HA resource.

One SAP instance is defined by having exactly one instance profile. The instance profiles can usually be found in the directory /sapmnt/$SID/profile/. In an Enqueue Replication setup one (ABAP-) Central Services instance ((A)SCS) and at least one Replicated Enqueue instance (ERS) are configured. An Linux HA cluster can control these instances by using the SAPInstance resource agent. That resource agent depends on the SAP sapstartsrv service for starting, stopping, monitoring and probing the instances. The sapstartsrv needs to read the respective instance profile. By default one system-wide sapstartsrv is started at Linux boot time to provide the needed service for all SAP instances.

For specific Enqueue Replication setups using instance specific sapstartsrv processes might be desireable. So each SAP instance is managed on its own by a pair of one SAPStartSrv and one SAPInstance resource agent. SAPStartSrv starts sapstartsrv for one specific SAP instance. By intention it does not monitor the service. SAPInstance then utilises that service for managing the SAP instance. SAPInstance also is doing in-line recovery of failed sapstartsrv processes. The instance's virtual service IP address is used for contacting the sapstartsrv process. Thus that IP address resource (e.g. IPAddr2, aws-vpc-route53) needs to start before SAPStartSrv.

The described setup is benefitial particularly for public cloud and NFS-based environments. Both NFS shares with instance directories can be mounted statically on all nodes. The HA cluster does not need to control that filesystems. The /usr/sap/sapservices file is stored locally on each cluster node.


This resource agent supports the following parameters:


The full qualified SAP instance name. e.g. P01_DVEBMGS00_sapp01ci. Usually this is the name of the SAP instance profile.
Unique, required, string, no default.


The name of the SAP START profile. Specify this parameter, if you have changed the name of the SAP START profile after the default SAP installation.
Unique, optional, string, no default.


This resource agent supports the following actions (operations):


Starts the sapstartsrv resource.
Suggested minimum timeout: 60.


Stops the sapstartsrv resource.
Suggested minimum timeout: 60.


Performs a minimal status check of the sapstartsrv resource.
Suggested minimum timeout: 60.


The SAPStartSrv resource must by intention not define a monitor operation. This is, because the failing sapstartsrv must never force a SAPInstance restart. That would happen because the two resources reside in one resource group.


Performs a validation of the resource configuration.
Suggested minimum timeout: 5.


Retrieves resource agent metadata (internal use only).
Suggested minimum timeout: 5.


The return codes are defined by the OCF cluster framework. Please refer to the OCF definition on the website mentioned below.


* Example configuration for SAP ASCS instance resource group in an ENSA2 setup.
SAP system name is EVA, SAP service is ASCS, SAP instance number is 00, SAP virtual hostname is sapeva. An loadbalancer is used together with dedicated IP netmask configuration for specific public cloud environments. The SAPInstance has been given a fencing priority, a crm property priority-fencing-delay is needed to make this work. See SAPStartSrv_basic_cluster(7). The shown SAPInstance monitor timeout is a trade-off between fast recovery of the ASCS vs. resilience against sporadic temporary NFS issues. You may slightly increase it to fit your infrastructure. Too short ASCS monitor timeouts likely will conflict with the instance´s internal recovery. The also needed ERS instance group and location constraint is shown in another example.

primitive rsc_SAPStartSrv_EVA_ASCS00 ocf:suse:SAPStartSrv \
params InstanceName=EVA_ASCS00_sapeva

primitive rsc_SAPInstance_EVA_ASCS00 SAPInstance \
op monitor interval=11 timeout=60 on-fail=restart \
params InstanceName=EVA_ASCS00_sapeva \
START_PROFILE=/sapmnt/EVA/profile/EVA_ASCS00_sapeva \
meta resource-stickiness=5000 \

primitive rsc_IPAddr2_EVA_ASCS00 IPaddr2 \
params ip= cidr_netmask=32

primitive rsc_Loadbalancer_EVA_ASCS00 azure-lb \
params port=85085

group grp_EVA_ASCS00 \
rsc_Loadbalancer_EVA_ASCS00 \
rsc_IPAddr2_EVA_ASCS00 \
rsc_SAPStartSrv_EVA_ASCS00 \
rsc_SAPInstance_EVA_ASCS00 \
meta resource-stickiness=3000

* Example configuration for SAP ERS instance resource group in an ENSA2 setup.
SAP system name is EN2, SAP service is ERS, SAP instance number is 10, SAP virtual hostname is sapeva. An IP address is configured as usual for on-premise use. If possible, the ERS instance should run on a different node than the ASCS. The also needed ASCS instance group is shown in another example.

primitive rsc_SAPStartSrv_EN2_ERS10 ocf:suse:SAPStartSrv \
params InstanceName=EN2_ERS10_sapen2er

primitive rsc_SAPInstance_EN2_ERS10 SAPInstance \
op monitor interval=11s timeout=60s \
params InstanceName=EN2_ERS10_sapen2er \
START_PROFILE=/sapmnt/EN2/profile/EN2_ERS10_sapen2er \

primitive rsc_IPAddr2_EN2_ERS10 IPaddr2 \
params ip=

group grp_EN2_ERS10 \
rsc_IPAddr2_EN2_ERS10 \
rsc_SAPStartSrv_EN2_ERS10 \

colocation col_EN2_ASCS00_separate \
-5000: grp_EN2_ERS10 grp_EN2_ASCS00

order ord_EN2_ASCS00_first \
Optional: rsc_SAPInstance_EN2_ASCS00:start \
rsc_SAPInstance_EN2_ERS10:stop \

* Example SAP ASCS instance profile adapted for ENSA2 HA setup.
SAP SID is EN2, instance number is 00, virtual hostname is sapen2er, service is _ENQ . Optionally you could limit the number of restarts of services, this is not done here. The instance profile /sapmnt/EN2/profile/EN2_ASCS00_sapen2er is adpated like this:

# ... some more above
Execute_04 = local rm -f $(_ENQ)
Execute_05 = local ln -s -f $(DIR_EXECUTABLE)/enq_server$(FT_EXE) $(_ENQ)
Start_Program_01 = local $(_ENQ) pf=$(_PF)
# some more below ...

* Example SAP ERS instance profile adapted for ENSA2 HA setup.
SAP SID is EN2, instance number is 10, virtual hostname is sapen2er, service is _ENQR . See also man page sap_suse_cluster_connector(8). The instance profile /sapmnt/EN2/profile/EN2_ERS10_sapen2er is adpated like this:

# ... some more above
Execute_02 = local rm -f $(_ENQR)
Execute_03 = local ln -s -f $(DIR_EXECUTABLE)/enq_replicator$(FT_EXE) $(_ENQR)
Start_Program_00 = local $(_ENQR) pf=$(_PF) NR=$(SCSID)
service/halib_cluster_connector = /usr/bin/sap_suse_cluster_connector
service/halib = $(DIR_CT_RUN)/

* Search for log entries of SAPStartSrv, show errors only:

# grep "SAPStartSrv.*RA.*rc=[1-7,9]" /var/log/messages

* Show failcount for resource rsc_SAPStartSrv_EN2_ERS10 . If the failcount exceeds the migration-threshold, the resource will be moved to another node. See SAPStartSrv_basic_cluster(7).

# cibadmin -Ql | grep rsc_SAPStartSrv_EN2_ERS10.*fail-count

* Manually trigger a SAPStartSrv probe action for instance ADA_ASCS00_engine. Output goes to the usual logfiles.

# OCF_ROOT=/usr/lib/ocf/ \
OCF_RESKEY_InstanceName=ADA_ASCS00_engine \
OCF_RESKEY_CRM_meta_interval=0 \
/usr/lib/ocf/resource.d/suse/SAPStartSrv monitor


the resource agent
the also needed SAP instance resource agent, package resource-agents
default path for the sapstartsrv executable
/sapmnt/$SID/profile/ (resp. /usr/sap/$SID/SYS/profile/)
default path for DIR_PROFILE
SAP profiles definition file
sap_suse_cluster_connector configuration, SLE-HA 12


* At least SAP instances NW7.40 for ENSA1. At least NW7.52 or SAP S/4HANA ABAP Platform 1909 for ENSA2.

* SAPInstance resource agent with MINIMAL_PROBE support, November 2020.

* Needed NFS shares (e.g. /sapmnt/$SID/, /usr/sap/$SID/) mounted statically or by automounter.

* Directory /usr/sap/ locally read-write mounted on each cluster node.

* Complete entries in /usr/sap/sapservices file.

* SAP instance profile Autostart feature is disabled for ASCS and ERS.

* For ENSA1 and ENSA2 HA setups, the ASCS instance profile entry for the enqueue service _ENQ, Restart_Program_xx is replaced by Start_Program_xx. Same for the ERS instance profile entry for the enqueue replicator service _ENQR. Other services stay untouched.

* The sapinit boot script does not read entries from sapservices file at boot. Thus services sapping and sappong to handle sapservices file at system boot.

* The sapinit script is not used while the HA cluster is running on any node.

* SAP instance numbers controlled by the cluster must be unique.

* It is not allowed to block resources from being controlled manually. Thus BLOCK_RESOURCES in /etc/sap_suse_cluster_connector is not allowed anymore.

* You need SAP hostagent installed and started on your systems. For SystemV style, the sapinit script needs to be enabled. For systemd style, the service saphostagent needs to be enabled and running. Instance services SAP${SID}_${INO} need to be disabled. The systemd enabled saphostagent and sapstartsrv is supported from sapstartsrv-resource-agents 0.9.1 onwards. An appropriate SAPInstance resource agent is needed, newer than November 2021. Please refer to the OS documentation for the systemd version. Please refer to SAP documentation for the SAP HANA version. Combining systemd style hostagent with SystemV style instance is allowed. However, all nodes in one Linux cluster have to use the same style.


The trace_ra resourcre tracing feature is not implemented so far.
Please report feedback and suggestions to


ocf_heartbeat_SAPInstance(7) , ocf_heartbeat_IPaddr2(7) , SAPStartSrv_basic_cluster(7) , systemctl(1) , sapservices-move(8) , sap_suse_cluster_connector(8) , crm(8) , nfs(5) , mount(8) , ha_related_suse_tids(7) , ha_related_sap_notes(7) , , , , , , , , , , , , , , , , , , ,


X.Arbulu, F.Herschel, L.Pinne


(c) 2020-2022 SUSE LLC
The resource agent SAPStartSrv comes with ABSOLUTELY NO WARRANTY.
For details see the GNU General Public License at

23 Jun 2022