Chapter 7. Test failover 7.1. Failover ASCS due to node crash Before the crash, ASCS was running on s4node1 while ERS was running on s4node2. On s4node2, run the following command to monitor the status changes in the cluster: [root@s4node2 ~]# crm_mon -Arf Crash s4node1 by running the following command. Please note that connection to s4node1 will be lost after the command. [root@s4node1 ~]# echo c > /proc/sysrq-trigger On s4node2, monitor the failover process. After failover, the cluster should be in such a state that the ASCS and ERS instance is running on s4node2. [root@s4node2 ~]# pcs status ... Resource Group: s4h_ASCS20_group s4h_lvm_ascs20 (ocf::heartbeat:LVM-activate): Started s4node2 s4h_fs_ascs20 (ocf::heartbeat:Filesystem): Started s4node2 s4h_vip_ascs20 (ocf::heartbeat:IPaddr2): Started s4node2 s4h_ascs20 (ocf::heartbeat:SAPInstance): Started s4node2 Resource Group: s4h_ERS29_group s4h_lvm_ers29 (ocf::heartbeat:LVM-activate): Started s4node2 s4h_fs_ers29 (ocf::heartbeat:Filesystem): Started s4node2 s4h_vip_ers29 (ocf::heartbeat:IPaddr2): Started s4node2 s4h_ers29 (ocf::heartbeat:SAPInstance): Started s4node2 ... 7.2. ERS moves to the previously failed node Bring s4node1 back online. ERS should remain on the current node instead of moving back to s4node1. 7.3. Test ERS crash Similarly, test crash the node where ERS is running. The ERS group should failover to the spare node while ASCS remains intact on its current node. After the crashed node is back, the ERS group should not move back. 7.4. Your cost-optimized SAP S/4HANA Cluster environment can look like the one below [root@s4node1 ~]# pcs status Cluster name: SAP-S4-HANA .... Node List: * Online: [ s4node1 s4node2 ] .... Full List of Resources: * s4-fence (stonith:fence_rhevm): Started s4node1 * Clone Set: fs_sapmnt-clone [fs_sapmnt]: * Started: [ s4node1 s4node2 ] * Clone Set: fs_sap_trans-clone [fs_sap_trans]: * Started: [ s4node1 s4node2 ] * Clone Set: fs_sap_SYS-clone [fs_sap_SYS]: * Started: [ s4node1 s4node2 ] * Resource Group: s4h_ASCS20_group: * s4h_lvm_ascs20 (ocf::heartbeat:LVM-activate): Started s4node1 * s4h_fs_ascs20 (ocf::heartbeat:Filesystem): Started s4node1 * s4h_ascs20 (ocf::heartbeat:SAPInstance): Started s4node1 * s4h_vip_ascs20 (ocf::heartbeat:IPaddr2): Started s4node1 * Resource Group: s4h_ERS29_group: * s4h_lvm_ers29 (ocf::heartbeat:LVM-activate): Started s4node2 * s4h_fs_ers29 (ocf::heartbeat:Filesystem): Started s4node2 * s4h_ers29 (ocf::heartbeat:SAPInstance): Started s4node2 * s4h_vip_ers29 (ocf::heartbeat:IPaddr2): Started s4node2 * Clone Set: SAPHanaTopology_S4D_00-clone [SAPHanaTopology_S4D_00]: * Started: [ s4node1 s4node2 ] * Clone Set: SAPHana_S4D_00-clone [SAPHana_S4D_00] (promotable): * Masters: [ s4node2 ] * Slaves: [ s4node1 ] * vip_S4D_00 (ocf::heartbeat:IPaddr2): Started s4node2

Commands:
crm_mon -Arf
echo c > /proc/sysrq-trigger
pcs status Resource Group: s4h_ASCS20_group s4h_lvm_ascs20 (ocf::heartbeat:LVM-activate): Started s4node2 s4h_fs_ascs20 (ocf::heartbeat:Filesystem): Started s4node2 s4h_vip_ascs20 (ocf::heartbeat:IPaddr2): Started s4node2 s4h_ascs20 (ocf::heartbeat:SAPInstance): Started s4node2 Resource Group: s4h_ERS29_group s4h_lvm_ers29 (ocf::heartbeat:LVM-activate): Started s4node2 s4h_fs_ers29 (ocf::heartbeat:Filesystem): Started s4node2 s4h_vip_ers29 (ocf::heartbeat:IPaddr2): Started s4node2 s4h_ers29 (ocf::heartbeat:SAPInstance): Started s4node2
pcs status Cluster name: SAP-S4-HANA .... Node List: * Online: [ s4node1 s4node2 ] .... Full List of Resources: * s4-fence (stonith:fence_rhevm): Started s4node1 * Clone Set: fs_sapmnt-clone [fs_sapmnt]: * Started: [ s4node1 s4node2 ] * Clone Set: fs_sap_trans-clone [fs_sap_trans]: * Started: [ s4node1 s4node2 ] * Clone Set: fs_sap_SYS-clone [fs_sap_SYS]: * Started: [ s4node1 s4node2 ] * Resource Group: s4h_ASCS20_group: * s4h_lvm_ascs20 (ocf::heartbeat:LVM-activate): Started s4node1 * s4h_fs_ascs20 (ocf::heartbeat:Filesystem): Started s4node1 * s4h_ascs20 (ocf::heartbeat:SAPInstance): Started s4node1 * s4h_vip_ascs20 (ocf::heartbeat:IPaddr2): Started s4node1 * Resource Group: s4h_ERS29_group: * s4h_lvm_ers29 (ocf::heartbeat:LVM-activate): Started s4node2 * s4h_fs_ers29 (ocf::heartbeat:Filesystem): Started s4node2 * s4h_ers29 (ocf::heartbeat:SAPInstance): Started s4node2 * s4h_vip_ers29 (ocf::heartbeat:IPaddr2): Started s4node2 * Clone Set: SAPHanaTopology_S4D_00-clone [SAPHanaTopology_S4D_00]: * Started: [ s4node1 s4node2 ] * Clone Set: SAPHana_S4D_00-clone [SAPHana_S4D_00] (promotable): * Masters: [ s4node2 ] * Slaves: [ s4node1 ] * vip_S4D_00 (ocf::heartbeat:IPaddr2): Started s4node2