本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
在节点 1 上重启 SAP HANA
描述-模拟运行主 SAP HANA 数据库的主节点崩溃。
运行节点:SAP HANA 主数据库节点
运行步骤:
-
以 root 用户身份使用以下命令使主数据库系统崩溃:
[root@prihana ~]# pcs status Cluster name: rhelhanaha Stack: corosync Current DC: sechana (version 1.1.19-8.el7_6.5-c3c624ea3d) - partition with quorum Last updated: Tue Nov 10 17:54:13 2020 Last change: Tue Nov 10 17:53:48 2020 by root via crm_attribute on prihana 2 nodes configured 6 resources configured Online: [ prihana sechana ] Full list of resources: clusterfence (stonith:fence_aws): Started prihana Clone Set: SAPHanaTopology_HDB_00-clone [SAPHanaTopology_HDB_00] Started: [ prihana sechana ] Master/Slave Set: SAPHana_HDB_00-master [SAPHana_HDB_00] Masters: [ prihana ] Slaves: [ sechana ] hana-oip (ocf::heartbeat:aws-vpc-move-ip): Started prihana Daemon Status: corosync: active/enabled pacemaker: active/enabled pcsd: active/enabled [root@prihana ~]# echo 'b' > /proc/sysrq-trigger
注意
要模拟系统崩溃,必须首先确保将其设置/proc/sys/kernel/sysrq
为 1。
预期结果:
-
群集检测到故障节点(节点 1),将其声明为 “
UNCLEAN
”,并将辅助节点(节点 2)设置为状态 “partition WITHOUT quorum
”。 -
集群围住节点 1,提升辅助的 SAP HANA 数据库,并在备份 EC2 实例时将其注册到新的主数据库。节点 1 目前处于停止状态,因为它正在重新启动。
[root@sechana ~]# pcs status Cluster name: rhelhanaha Stack: corosync Current DC: sechana (version 1.1.19-8.el7_6.5-c3c624ea3d) - partition with quorum Last updated: Tue Nov 10 18:17:24 2020 Last change: Tue Nov 10 18:17:06 2020 by root via crm_attribute on sechana 2 nodes configured 6 resources configured Online: [ prihana sechana ] Full list of resources: clusterfence (stonith:fence_aws): Started sechana Clone Set: SAPHanaTopology_HDB_00-clone [SAPHanaTopology_HDB_00] Started: [ prihana sechana ] Master/Slave Set: SAPHana_HDB_00-master [SAPHana_HDB_00] Masters: [ sechana ] OFFLINE: [ prihana ] hana-oip (ocf::heartbeat:aws-vpc-move-ip): Started sechana Daemon Status: corosync: active/enabled pacemaker: active/enabled pcsd: active/enabled [root@sechana ~]#
-
重叠 IP 地址已迁移到新的主地址(在节点 2 上)。
-
因为
AUTOMATIC_REGISTER
=true
,集群会重新启动失败的 HANA 数据库,并在备份 EC2 实例时将其注册到新的主数据库。
恢复程序:
-
使用 AWS Management Console 或 AWS CLI 工具启动节点 1(EC2 实例)。