Stop the SAP HANA database on the primary node
Description — Stop the primary SAP HANA database during normal cluster operation.
Run node — Primary SAP HANA database node
Run steps:
-
Stop the primary SAP HANA database gracefully as
<sid>adm
.prihana:~ # su - hdbadm hdbadm@prihana:/usr/sap/HDB/HDB00> HDB stop hdbdaemon will wait maximal 300 seconds for NewDB services finishing. Stopping instance using: /usr/sap/HDB/SYS/exe/hdb/sapcontrol -prot NI_HTTP -nr 00 -function Stop 400 12.11.2020 11:39:19 Stop OK Waiting for stopped instance using: /usr/sap/HDB/SYS/exe/hdb/sapcontrol -prot NI_HTTP -nr 00 -function WaitforStopped 600 2 12.11.2020 11:39:51 WaitforStopped OK hdbdaemon is stopped.
Expected result:
-
The cluster detects stopped primary SAP HANA database (on node 1) and promotes secondary SAP HANA database (on node 2) to take over as primary.
prihana:~ # crm status Stack: corosync Current DC: prihana (version 1.1.18+20180430.b12c320f5-3.24.1-b12c320f5) - partition with quorum Last updated: Thu Nov 12 11:41:31 2020 Last change: Thu Nov 12 11:41:30 2020 by root via crm_attribute on sechana 2 nodes configured 6 resources configured Online: [ prihana sechana ] Full list of resources: res_AWS_STONITH (stonith:external/ec2): Started prihana res_AWS_IP (ocf::suse:aws-vpc-move-ip): Started sechana Clone Set: cln_SAPHanaTopology_HDB_HDB00 [rsc_SAPHanaTopology_HDB_HDB00] Started: [ prihana sechana ] Master/Slave Set: msl_SAPHana_HDB_HDB00 [rsc_SAPHana_HDB_HDB00] Masters: [ sechana ] Slaves: [ prihana ] Failed Actions: * rsc_SAPHana_HDB_HDB00_monitor_60000 on prihana 'master (failed)' (9): call=30, status=complete, exitreason='', last-rc-change='Thu Nov 12 11:40:42 2020', queued=0ms, exec=0ms
-
The overlay IP address is migrated to the new primary (on node 2).
sechana:~ # ip addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP group default qlen 1000 link/ether 0e:ef:dd:3c:bf:1b brd ff:ff:ff:ff:ff:ff inet 11.0.2.139/24 brd 11.0.2.255 scope global eth0 valid_lft forever preferred_lft forever inet 11.0.2.35/32 scope global eth0:1 valid_lft forever preferred_lft forever inet 192.168.10.16/32 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::cef:ddff:fe3c:bf1b/64 scope link valid_lft forever preferred_lft forever
-
With the
AUTOMATIC_REGISTER
parameter set to "true
", the cluster restarts the failed SAP HANA database and automatically registers it against the new primary.
Recovery procedure:
-
Clean up the cluster “
failed actions
” on node 1 as root.prihana:~ # crm resource cleanup rsc_SAPHana_HDB_HDB00 prihana Cleaned up rsc_SAPHana_HDB_HDB00:0 on prihana Cleaned up rsc_SAPHana_HDB_HDB00:1 on prihana Waiting for 1 replies from the CRMd. OK
-
After you run the
crm
command to clean up the resource, “failed actions
” messages should disappear from the cluster status.prihana:~ # crm status Stack: corosync Current DC: prihana (version 1.1.18+20180430.b12c320f5-3.24.1-b12c320f5) - partition with quorum Last updated: Thu Nov 12 11:44:05 2020 Last change: Thu Nov 12 11:43:39 2020 by hacluster via crmd on prihana 2 nodes configured 6 resources configured Online: [ prihana sechana ] Full list of resources: res_AWS_STONITH (stonith:external/ec2): Started prihana res_AWS_IP (ocf::suse:aws-vpc-move-ip): Started sechana Clone Set: cln_SAPHanaTopology_HDB_HDB00 [rsc_SAPHanaTopology_HDB_HDB00] Started: [ prihana sechana ] Master/Slave Set: msl_SAPHana_HDB_HDB00 [rsc_SAPHana_HDB_HDB00] Masters: [ sechana ] Slaves: [ prihana ]