SAPHana - SAP HANA on AWS

SAPHana

Create a file called “crm-saphana.txt” with the following cluster bootstrap options for SAP HANA:

prihana:~ # cat crm-saphana.txt primitive rsc_SAPHana_HDB_HDB00 ocf:suse:SAPHana \ op start interval="0" timeout="3600" \ op stop interval="0" timeout="3600" \ op promote interval="0" timeout="3600" \ op monitor interval="60" role="Master" timeout="700" \ op monitor interval="61" role="Slave" timeout="700" \ params SID="HDB" InstanceNumber="10" PREFER_SITE_TAKEOVER="true" \ DUPLICATE_PRIMARY_TIMEOUT="7200" AUTOMATED_REGISTER="true" ms msl_SAPHana_HDB_HDB00 rsc_SAPHana_HDB_HDB00 \ meta clone-max="2" clone-node-max="1" interleave="true"

Update the value of parameters SID and InstanceNumber with your SAP HANA system information. In addition, update the SID and Instance number referred in the rsc_SAPHana_<SID>HDB<Instance Number> and msl_SAPHana<SID>_HDB<Instance Number> configuration.

Note

You can find the detailed information about all the parameters with the command “man ocf_suse_SAPHana

Add the SAP HANA configuration file to the cluster with the following command:

prihana:~ # crm configure load update crm-saphana.txt

When using an SAP HANA version with systemd integration (SPS07 and later), you must run the following steps to prevent the nodes from being fenced when Amazon EC2 instances are intentionally stopped.

  1. Verify if SAP HANA is integrated with systemd. If it is integrated, a systemd service name, such as SAP<SID>_XX.service is present. For example, for SID HDB and instance number 00, SAPHDB_00.service is the service name.

    Use the following command as root to find SAP systemd services.

    prihanadb:~ # systemctl list-units | grep SAP aws-dataprovider.service loaded active running AWS Data Provider for SAP pacemaker.service loaded active running pacemaker needs SAP instance service SAPHDB_00.service loaded active running SAP Instance SAPHDB_00 saphostagent.service loaded active running SAP Host Agent SAP.slice loaded active active SAP Slice
  2. Create a pacemaker service drop-in file.

    # mkdir -p /etc/systemd/system/pacemaker.service.d/ cat <<_EOF > /etc/systemd/system/pacemaker.service.d/00-pacemaker.conf [Unit] Description=pacemaker needs SAP instance service Documentation=man:SAPHanaSR_basic_cluster(7) Wants=SAP<SID>_XX.service After=SAP<SID>_XX.service _EOF
  3. Enable the drop-in file by reloading systemd.

    # systemctl daemon-reload
  4. Verify that the change is active.

    # systemctl show pacemaker.service | grep SAP<SID>_XX

    For example, for SID HDB and instance number 00, the following output is expected.

    # systemctl show pacemaker.service | grep SAPHDB_00 Wants=SAPHDB_00.service resource-agents-deps.target dbus.service After=system.slice network.target corosync.service resource-agents-deps.target basic.target rsyslog.service SAPHDB_00.service systemd-journald.socket sysinit.target time-sync.target dbus.service sbd.service