Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 4. Configuring the ASCS and ERS instances
4.1. Configuring the ASCS/ERS instance profiles Link kopierenLink in die Zwischenablage kopiert!
The ASCS and ERS instance profiles contain Restart directives for certain instance services by default. You must modify the profiles to prevent the automatic restart of the enqueue replication server process by the SAP Start service, because the cluster manages the availability of this service.
Procedure
Update the profile of the ASCS instance and rename the
Restart_Program_01parameter of the enqueue server:[root]# sed -i -e 's/Restart_Program_01/Start_Program_01/' \ /sapmnt/<SID>/profile/<SID>_ASCS<instance>_<ascs_virtual_hostname>-
Replace
<SID>with your instance SID, for example,S4H. -
Replace
<instance>with the ASCS instance number, for example,20. -
Replace
<ascs_virtual_hostname>with the virtual hostname of your ASCS instance, for example,s4hascs.
-
Replace
Update the profile of the ERS instance and rename the
Restart_Program_00parameter of the enqueue server:[root]# sed -i -e 's/Restart_Program_00/Start_Program_00/' \ /sapmnt/<SID>/profile/<SID>_ERS<instance>_<ers_virtual_hostname>-
Replace
<SID>with your instance SID, for example,S4H. -
Replace
<instance>with the ERS instance number, for example,29. -
Replace
<ers_virtual_hostname>with the virtual hostname of your ERS instance, for example,s4hers.
-
Replace
Verification
Verify that the ASCS instance profile does not contain the
Restart_Program_01parameter:[root]# grep Restart_Program_01 /sapmnt/S4H/profile/*_ASCS*Verify that the ERS instance profile does not contain the
Restart_Program_00parameter:[root]# grep Restart_Program_00 /sapmnt/S4H/profile/*_ERS*
4.2. Configuring the systemd-based SAP startup framework Link kopierenLink in die Zwischenablage kopiert!
Systemd integration is the default configuration as of SAP Kernel Release 788. In HA environments you must apply additional modifications to integrate the different systemd services that are involved in the cluster setup.
You must execute the configuration on every cluster node and for every instance that you plan to manage in the cluster. At a minimum you must configure this for the ASCS and ERS instances. PAS and AAS instance configuration is optional and only required if you manage them in the same cluster.
Procedure
Register the ASCS instance. Run the following SAP command as the root user to create the systemd integration:
[root]# export LD_LIBRARY_PATH=/usr/sap/<SID>/ASCS<instance>/exe && \ /usr/sap/<SID>/ASCS<instance>/exe/sapstartsrv \ pf=/usr/sap/<SID>/SYS/profile/<SID>_ASCS<instance>_<ascs_virtual_hostname> \ -regThe command executes the
sapstartsrvservice for the selected instance profile and registers the instance service on the current system. It creates the systemd unit for the instance service, if it does not exist, and updates the local/usr/sap/sapservicesfile.-
Replace
<SID>with your ASCS instance SID, for example,S4H. -
Replace
<instance>with your ASCS instance number, for example,20. -
Replace
<ascs_virtual_hostname>with the virtual hostname for your ASCS instance, for example,s4hascs.
-
Replace
Register the ERS instance by repeating step 1 for the ERS profile:
[root]# export LD_LIBRARY_PATH=/usr/sap/<SID>/ERS<instance>/exe && \ /usr/sap/<SID>/ERS<instance>/exe/sapstartsrv \ pf=/usr/sap/<SID>/SYS/profile/<SID>_ERS<instance>_<ers_virtual_hostname> \ -reg-
Replace
<SID>with your ERS instance SID, for example,S4H. -
Replace
<instance>with your ERS instance number, for example,29. -
Replace
<ers_virtual_hostname>with the virtual hostname for your ERS instance, for example,s4hers.
-
Replace
Optional: Register any PAS or AAS instance by repeating step 1 for the respective application server profile. Skip this step if you do not configure PAS or AAS instances in this cluster:
[root]# export LD_LIBRARY_PATH=/usr/sap/<SID>/D<instance>/exe && \ /usr/sap/<SID>/D<instance>/exe/sapstartsrv \ pf=/usr/sap/<SID>/SYS/profile/<SID>_D<instance>_<as_virtual_hostname> \ -reg-
Replace
<SID>with your PAS or AAS instance SID, for example,S4H. -
Replace
<instance>with your PAS or AAS instance number, for example,21. -
Replace
<as_virtual_hostname>with the virtual hostname for your PAS or AAS instance, for example,s4hpas.
-
Replace
Disable the ASCS, ERS and any other application instance service that the cluster manages after the setup:
[root]# systemctl disable SAP<SID>_<instance>.service Removed "/etc/systemd/system/multi-user.target.wants/SAP<SID>_<instance>.service".Run this using the ASCS instance number and repeat the command using the ERS instance number.
Optional: Repeat the same for the PAS or AAS instance services.
Create the systemd drop-in directory for the ASCS, ERS and any other application instance service that the cluster manages after the setup:
[root]# mkdir /etc/systemd/system/SAP<SID>_<instance>.service.dRun this using the ASCS instance number and repeat the command using the ERS instance number.
Optional: Repeat using the PAS or AAS instance number.
Create the drop-in files for the instances in the new directory:
[root]# cat << EOF > /etc/systemd/system/SAP<SID>_<instance>.service.d/HA.conf [Service] Restart=no EOFRun this using the ASCS instance number and repeat the command using the ERS instance number.
Optional: Repeat using the PAS or AAS instance number.
Reload the systemd units to activate the drop-in configuration:
[root]# systemctl daemon-reload- Repeat all steps on each cluster node for every instance.
Verification
Check that all instances have instance systemd units and that they are disabled:
[root]# systemctl list-unit-files SAPS4H* UNIT FILE STATE PRESET SAPS4H_20.service disabled disabled SAPS4H_29.service disabled disabledOptional: PAS or AAS instance service files are listed as well in all of the verification steps when you have configured the application server instances.
Check that the
sapservicesfile contains entries for every instance:[root]# cat /usr/sap/sapservices systemctl --no-ask-password start SAPS4H_20 # sapstartsrv pf=/sapmnt/S4H/profile/S4H_ASCS20_s4hascs systemctl --no-ask-password start SAPS4H_29 # sapstartsrv pf=/sapmnt/S4H/profile/S4H_ERS29_s4hersCheck that all systemd configuration overrides are present:
[root]# systemd-delta | grep SAP ... [EXTENDED] /etc/systemd/system/SAPS4H_20.service/etc/systemd/system/SAPS4H_20.service.d/HA.conf [EXTENDED] /etc/systemd/system/SAPS4H_29.service /etc/systemd/system/SAPS4H_29.service.d/HA.conf - Repeat the steps on every cluster node. The results must be the same on all nodes.
4.3. Verifying that the SAP instances can be started and stopped on all cluster nodes Link kopierenLink in die Zwischenablage kopiert!
Start and stop the application instances on all cluster nodes to verify that the prerequisites are met to configure and manage the instances in the cluster.
Prerequisites
-
You have configured the systemd-based SAP Start framework. If not, you must use the respective
sapcontrolcommands instead of thesystemctlcommands for the stop and start of the instances. - You have stopped each instance before starting it on another node.
Procedure
Stop the instance on the node where it currently runs, for example, stop ASCS on node1:
[root]# systemctl stop SAP<SID>_<instance>.serviceStopping the SAP instance systemd service stops both the instance service and the instance itself.
Start the instance service
sapstartsrvon the node where it was not running before, for example, start the ASCS service on node2:[root]# systemctl start SAP<SID>_<instance>.serviceStart the instance using
sapcontrolas the<sid>admuser. Replace<instance>with the instance number, for example,20for the ASCS instance:<sid>adm $ sapcontrol -nr <instance> -function StartVerify the instance’s health after it starts on the other node. Run this check as the
<sid>admuser. Replace<instance>with the instance number, for example,20for the ASCS instance. The status of all services must beGREEN:<sid>adm $ sapcontrol -nr <instance> -function GetProcessList- Optional: Repeat the previous steps to move the instance back to its original node, for example, move ASCS back to node1.
- Repeat all steps for the ERS instance.
- Optional: If you configure PAS or AAS instances, then repeat the steps for these application server instances as well.
4.4. Installing the SAP license keys Link kopierenLink in die Zwischenablage kopiert!
To ensure that the SAP instances continue to run after a failover, you have to install several SAP license keys based on the hardware key of each cluster node. See SAP Note 1178686 - Linux: Alternative method to generate a SAP hardware key for more information.