Describe désert/SAP/HANA-Maintenance here.
Migrating and SAP HANA Primary
HDB资源之主备切换
Pre move
- Set the rsc_SAPHana_SLE_HDB00 to be maintenance.
~# crm resouce maintenance rsc_SAPHana_SLE_HDB00
saprep01:~ # crm status detail
Stack: corosync
Current DC: saprep01 (1) (version 1.1.15-19.15-e174ec8) - partition with quorum
Last updated: Tue Aug 8 16:02:14 2023
Last change: Tue Aug 8 15:52:13 2023 by root via crm_resource on saprep01
2 nodes configured
6 resources configured
Online: [ saprep01 (1) saprep02 (2) ]
stonith-sbd (stonith:external/sbd): Started saprep01
rsc_ip_SLE_HDB00 (ocf::heartbeat:IPaddr2): Started saprep02
Master/Slave Set: msl_SAPHana_SLE_HDB00 [rsc_SAPHana_SLE_HDB00] (unmanaged)
rsc_SAPHana_SLE_HDB00 (ocf::suse:SAPHana): Slave saprep01 (unmanaged)
rsc_SAPHana_SLE_HDB00 (ocf::suse:SAPHana): Master saprep02 (unmanaged)
Clone Set: cln_SAPHanaTopology_SLE_HDB00 [rsc_SAPHanaTopology_SLE_HDB00]
rsc_SAPHanaTopology_SLE_HDB00 (ocf::suse:SAPHanaTopology): Started saprep01
rsc_SAPHanaTopology_SLE_HDB00 (ocf::suse:SAPHanaTopology): Started saprep02
Started: [ saprep01 saprep02 ]
Manual Takeove Process
- Stop the primary SAP HANA database system.
~$ sapcontrol -nr 0 -function StopSystem HDB
- Start the takeover on the secondary SAP HANA database system.
~$ hdbnsutl -sr_takeover
- Register the former primary to become the new secondary.
~$ hdbnsutil -sr_register --name=DRSITE01 --remoteHost=saprep02 --remoteInstance=00 --replicationMode=async --operationMode=logreplay
- Start the new secondary SAP HANA database system.
~$ sapcontrol -nr 0 -function StartSystem HDB
Post Migrate
- Wait some time till SAPHanaSR-showAttr shows both SAP HANA database systems to be up again (field roles must start with the digit 4). The new secondary should have role "S" (for secondary).
- Tell the cluster to forget about the former master-slave roles and to re-monitor the failed master. The command could be submitted on any cluster node as user root.
saprep01:~ # crm resource refresh rsc_SAPHana_SLE_HDB00
- Set the master/slave resource to the status managed again. The command could be submitted on any cluster node as user root.
~# crm resouce maintenance rsc_SAPHana_SLE_HDB00 off
