Configure SAP for Cluster Control
Modify SAP service configurations, user permissions, and system integration settings to enable proper cluster control of ASCS and ERS instances.
Topics
Add <sid>adm to haclient group
This is applicable to both cluster nodes. An haclient operating system group is created when the cluster connector package is installed. Adding the <sid>adm user to this group ensures that your cluster has necessary access. Run the following command as root:
# usermod -a -G haclient <sid>adm
-
Example using values from Parameter Reference :
# usermod -a -G haclient rhxadm
Modify SAP profiles for start operations and cluster hook
This action ensures that there is compatibility between the SAP start framework and cluster actions. Modify SAP profiles to change the start behavior of the SAP instance and processes. Ensure that sapcontrol is aware that the system is being managed by a pacemaker cluster.
-
ASCS profile –
/usr/sap/<SID>/SYS/profile/<SID>_ASCS<ascs_sys_nr>_<ascs_virt_hostname> -
ERS profile –
/usr/sap/<SID>/SYS/profile/<SID>_ERS<ers_sys_nr>_<ers_virt_hostname>
The profile directory /usr/sap/<SID>/SYS/profile/ is typically a symbolic link to /sapmnt/<SID>/profile/ on the shared NFS filesystem. This means profile modifications made on one node are immediately visible on all cluster nodes. You can modify the profiles from either node.
-
Example using values from Parameter Reference :
-
ASCS profile example –
/usr/sap/RHX/SYS/profile/RHX_ASCS00_rhxascs -
ERS profile example –
/usr/sap/RHX/SYS/profile/RHX_ERS10_rhxers
-
Follow the procedure outlined below to make the necessary changes:
-
Program or process start behavior – In case of failure, processes must be restarted. Determining where the process starts and in what order needs to be controlled by the cluster, and not SAP start framework behavior defined in the profiles. Your locks can be lost if this parameter is not changed. In newer SAP installations, the profiles may already contain
Start_Program_XXinstead ofRestart_Program_XX. IfStart_Program_XXis already present, no changes are needed for this step. -
Disable instance auto start in both profiles – When an instance restarts, SAP start framework should not start ASCS and ERS automatically. Add the following parameter on both profiles to prevent an auto start:
# Disable instance auto start Autostart = 0 -
Add cluster connector details in both profiles – The connector integrates the SAP start and control frameworks of SAP NetWeaver with Red Hat cluster to assist with maintenance and awareness of state. Add the following parameters on both profiles:
# Added for Cluster Connectivity service/halib = $(DIR_EXECUTABLE)/saphascriptco.so service/halib_cluster_connector = /usr/bin/sap_cluster_connectorImportant
RPM package
sap-cluster-connectorhas dashes. The executable/usr/bin/sap_cluster_connectoravailable after installation has underscores. Ensure that the correct name, that is executable/usr/bin/sap_cluster_connector, is used in both profiles. -
Restart services – Restart SAP services for ASCS and ERS to ensure that the preceding settings take effect. Adjust the system number to match the service.
ASCS
# /usr/sap/hostctrl/exe/sapcontrol -nr 00 -function RestartServiceERS
# /usr/sap/hostctrl/exe/sapcontrol -nr <ers_sys_nr> -function RestartService-
Example using values from Parameter Reference :
ASCS
# /usr/sap/hostctrl/exe/sapcontrol -nr 00 -function RestartServiceERS
# /usr/sap/hostctrl/exe/sapcontrol -nr 10 -function RestartService
-
-
Check integration using
sapcontrol–sapcontrolincludes functions:HACheckConfigandHACheckFailoverConfig. These functions can be used to check configuration, including awareness of the cluster connector. These checks have limited value before the cluster is configured, but you can run HACheckFailoverConfig to ensure the base configuration is in place.ASCS
# /usr/sap/hostctrl/exe/sapcontrol -nr <ascs_sys_nr> -function HACheckFailoverConfig-
Example using values from Parameter Reference :
ASCS
# /usr/sap/hostctrl/exe/sapcontrol -nr 00 -function HACheckFailoverConfig 10.10.2025 01:23:55 HACheckFailoverConfig OK state, category, description, comment SUCCESS, SAP CONFIGURATION, SAPInstance RA sufficient version, SAPInstance includes is-ers patch
-
Enable sapping and sappong Services (Simple-Mount Only)
For simple-mount architecture, enable the sapping and sappong systemd services on both cluster nodes. These services ensure proper SAP instance startup coordination between systemd and the cluster.
The sapping service runs before sapinit during boot and temporarily hides the /usr/sap/sapservices file to prevent automatic SAP instance startup. The sappong service runs after sapinit and restores the sapservices file, making it available for cluster management while maintaining compatibility with SAP management tools.
# systemctl enable sapping # systemctl enable sappong
Verify the services are enabled:
# systemctl status sapping # systemctl status sappong
Note
Both services will show "inactive (dead)" status, which is normal for one-shot services that only run during system boot.
Ensure ASCS and ERS SAP Services can run on either node (systemd)
This is applicable to both cluster nodes.
To ensure that the cluster can orchestrate availability by starting and stopping instances on either cluster node, the SAP Services must be registerd on both nodes and auto-start should be disabled.
In recent Operating System and SAP kernel versions, SAP offers systemd integration for sapstartsrv which controls how SAP instances are stopped and started. This is the recommended configuration and a requirement for Simple Mount Configuration.
For more details, see the following SAP Notes (require SAP portal access):
You can confirm whether systemd is in place by running the following command. Systemd is in place if SAP Services (e.g., SAPRHX_00.service, SAPRHX_10.service) are listed.
# systemctl list-unit-files SAP*
If you have installed an ASCS or ERS on this host but no SAP Services are returned, the classic SysV init may be in use. In that case you can skip to section (Alternative) Ensure ASCS and ERS SAP Services can run on either node (sysV)
-
On the instance where the ASCS was installed
Register the missing ERS service on the node where you have installed ASCS.
-
Temporarily mount the ERS directory (classic only):
# mount <nfs.fqdn>:/<SID>_ERS<ers_sys_nr> /usr/sap/<SID>/ERS<ers_sys_nr> -
Register the ERS service:
# export LD_LIBRARY_PATH=/usr/sap/<SID>/ERS<ers_sys_nr>/exe # /usr/sap/<SID>/ERS<ers_sys_nr>/exe/sapstartsrv pf=/usr/sap/<SID>/SYS/profile/<SID>_ERS<ers_sys_nr>_<ers_virt_hostname> -reg # systemctl start SAP<SID>_<ers_sys_nr> -
Check the existence and state of SAP services (example):
# systemctl list-unit-files SAP* UNIT FILE STATE VENDOR PRESET SAPRHX_00.service disabled disabled SAPRHX_10.service disabled disabled SAP.slice static - 3 unit files listed. -
If the state is not disabled, run the following command to disable
sapservicesintegration forSAP<SID>_<ascs_sys_nr>andSAP<SID>_<ers_sys_nr>on both nodes:Important
Stopping these services also stops the associated SAP instances.
# systemctl stop SAP<SID>_<ascs_sys_nr>.service # systemctl disable SAP<SID>_<ascs_sys_nr>.service # systemctl stop SAP<SID>_<ers_sys_nr>.service # systemctl disable SAP<SID>_<ers_sys_nr>.service -
Unmount the ERS directory (classic only):
# umount /usr/sap/<SID>/ERS<ers_sys_nr>-
Example using values from Parameter Reference :
# mount <nfs.fqdn>:/RHX_ERS10 /usr/sap/RHX/ERS10 # export LD_LIBRARY_PATH=/usr/sap/RHX/ERS10/exe # /usr/sap/RHX/ERS10/exe/sapstartsrv pf=/usr/sap/RHX/SYS/profile/RHX_ERS10_rhxers -reg # systemctl start SAPRHX_10 # systemctl stop SAPRHX_00.service # systemctl disable SAPRHX_00.service # systemctl stop SAPRHX_10.service # systemctl disable SAPRHX_10.service # umount /usr/sap/RHX/ERS10
-
-
-
On the instance where the ERS was installed
Register the missing ASCS service on the node where you have installed ERS.
-
Temporarily mount the ASCS directory (classic only):
# mount <nfs.fqdn>:/<SID>_ASCS<ascs_sys_nr> /usr/sap/<SID>/ASCS<ascs_sys_nr> -
Register the ASCS service:
# export LD_LIBRARY_PATH=/usr/sap/<SID>/ASCS<ascs_sys_nr>/exe # /usr/sap/<SID>/ASCS<ascs_sys_nr>/exe/sapstartsrv pf=/usr/sap/<SID>/SYS/profile/<SID>_ASCS<ascs_sys_nr>_<ascs_virt_hostname> -reg # systemctl start SAP<SID>_<ascs_sys_nr> -
Check the existence and state of SAP services (example):
# systemctl list-unit-files SAP* UNIT FILE STATE VENDOR PRESET SAPRHX_00.service disabled disabled SAPRHX_10.service disabled disabled SAP.slice static - 3 unit files listed. -
If the state is not disabled, run the following command to disable
sapservicesintegration forSAP<SID>_<ascs_sys_nr>andSAP<SID>_<ers_sys_nr>on both nodes:Important
Stopping these services also stops the associated SAP instances.
# systemctl stop SAP<SID>_<ascs_sys_nr>.service # systemctl disable SAP<SID>_<ascs_sys_nr>.service # systemctl stop SAP<SID>_<ers_sys_nr>.service # systemctl disable SAP<SID>_<ers_sys_nr>.service -
Unmount the ASCS directory (classic only):
# umount /usr/sap/<SID>/ASCS<ascs_sys_nr>-
Example using values from Parameter Reference :
# mount <nfs.fqdn>:/RHX_ASCS00 /usr/sap/RHX/ASCS00 # export LD_LIBRARY_PATH=/usr/sap/RHX/ASCS00/exe # /usr/sap/RHX/ASCS00/exe/sapstartsrv pf=/usr/sap/RHX/SYS/profile/RHX_ASCS00_rhxascs -reg # systemctl start SAPRHX_00 # systemctl stop SAPRHX_00.service # systemctl disable SAPRHX_00.service # systemctl stop SAPRHX_10.service # systemctl disable SAPRHX_10.service # umount /usr/sap/RHX/ASCS00
-
-
Configure dependencies for Pacemaker and SAP services (systemd)
This step is required on both cluster nodes when using systemd integration.
When an EC2 instance shuts down unexpectedly, Pacemaker (the cluster resource manager) may trigger unnecessary fencing actions because it cannot distinguish between planned SAP service shutdowns and system failures. To prevent this, configure systemd dependencies that inform Pacemaker about the relationship between SAP services and cluster operations.
Create a systemd drop-in configuration for the resource-agents-deps.target, which is a systemd target that Pacemaker uses to understand external service dependencies:
# mkdir -p /etc/systemd/system/resource-agents-deps.target.d/ # cd /etc/systemd/system/resource-agents-deps.target.d/ # cat > sap_systemd_<sid>.conf <<_EOF [Unit] Requires=sapinit.service After=sapinit.service After=SAP<SID>_<ascs_sys_nr>.service After=SAP<SID>_<ers_sys_nr>.service _EOF # systemctl daemon-reload
-
Example using values from Parameter Reference :
# cat > sap_systemd_rhx.conf <<_EOF [Unit] Requires=sapinit.service After=sapinit.service After=SAPRHX_00.service After=SAPRHX_10.service _EOF # systemctl daemon-reload
(Alternative) Ensure ASCS and ERS SAP Services can run on either node (sysV)
This is only applicable for if systemd integration is not in place.
To ensure that SAP instance can be managed by the cluster and also manually during planned maintenance activities, add the missing entries for ASCS and ERS sapstartsrv service in /usr/sap/sapservices file on both cluster nodes (ASCS and ERS host). Copy the missing entry from both hosts. Post-modifications, the /usr/sap/sapservices file looks as follows on both hosts:
#!/bin/sh LD_LIBRARY_PATH=/usr/sap/<SID>/ASCS<ascs_sys_nr>/exe:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; /usr/sap/<SID>/ASCS<ascs_sys_nr>/exe/sapstartsrv pf=/usr/sap/<SID>/SYS/profile/<SID>_ASCS<ascs_sys_nr>_<ascs_virt_hostname> -D -u <sid>adm LD_LIBRARY_PATH=/usr/sap/<SID>/ERS<ers_sys_nr>/exe:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; /usr/sap/<SID>/ERS<ers_sys_nr>/exe/sapstartsrv pf=/usr/sap/<SID>/SYS/profile/<SID>_ERS<ers_sys_nr>_<ers_virt_hostname> -D -u <sid>adm
-
Example using values from Parameter Reference :
#!/bin/sh LD_LIBRARY_PATH=/usr/sap/RHX/ASCS00/exe:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; /usr/sap/RHX/ASCS00/exe/sapstartsrv pf=/usr/sap/RHX/SYS/profile/RHX_ASCS00_rhxascs -D -u rhxadm LD_LIBRARY_PATH=/usr/sap/RHX/ERS10/exe:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; /usr/sap/RHX/ERS10/exe/sapstartsrv pf=/usr/sap/RHX/SYS/profile/RHX_ERS10_rhxers -D -u rhxadm