7.2. 查看最终集群状态
在为扩展 HANA 系统复制设置配置 2 节点集群后,其状态类似以下示例。
如果您没有配置可选的 SAPHanaFilesystem 资源,以及第二个实例上只读访问的可选第二个虚拟 IP,您的设置可能会与示例稍有不同。
另外,您可以决定是否要禁用集群服务,因此它不会在系统引导时自动启动。这需要在每次系统引导时手动干预,但允许您进行更多控制和监管启动。
pcs status --full
[root]# pcs status --full
...
Cluster name: node1-node2-cluster
Cluster Summary:
* Stack: corosync (Pacemaker is running)
* Current DC: node2 (2) (version 2.1.7-5.2.el9_4-0f7f88312) - partition with quorum
* Last updated: Thu May 8 13:49:46 2025 on node1
* Last change: Thu May 8 13:49:14 2025 by root via root on node1
* 2 nodes configured
* 9 resource instances configured
Node List:
* Node node1 (1): online, feature set 3.19.0
* Node node2 (2): online, feature set 3.19.0
Full List of Resources:
* Clone Set: cln_SAPHanaTop_RH1_HDB02 [rsc_SAPHanaTop_RH1_HDB02]:
* rsc_SAPHanaTop_RH1_HDB02 (ocf:heartbeat:SAPHanaTopology): Started node1
* rsc_SAPHanaTop_RH1_HDB02 (ocf:heartbeat:SAPHanaTopology): Started node2
* Clone Set: cln_SAPHanaCon_RH1_HDB02 [rsc_SAPHanaCon_RH1_HDB02] (promotable):
* rsc_SAPHanaCon_RH1_HDB02 (ocf:heartbeat:SAPHanaController): Promoted node1
* rsc_SAPHanaCon_RH1_HDB02 (ocf:heartbeat:SAPHanaController): Unpromoted node2
* Clone Set: cln_SAPHanaFil_RH1_HDB02 [rsc_SAPHanaFil_RH1_HDB02]:
* rsc_SAPHanaFil_RH1_HDB02 (ocf:heartbeat:SAPHanaFilesystem): Started node1
* rsc_SAPHanaFil_RH1_HDB02 (ocf:heartbeat:SAPHanaFilesystem): Started node2
* rsc_vip_RH1_HDB02_primary (ocf:heartbeat:IPaddr2): Started node1
* rsc_vip_RH1_HDB02_readonly (ocf:heartbeat:IPaddr2): Started node2
Node Attributes:
* Node: node1 (1):
* hana_rh1_clone_state : PROMOTED
* hana_rh1_roles : master1:master:worker:master
* hana_rh1_site : DC1
* hana_rh1_sra : -
* hana_rh1_srah : -
* hana_rh1_version : 2.00.078.00
* hana_rh1_vhost : node1
* master-rsc_SAPHanaCon_RH1_HDB02 : 150
* Node: node2 (2):
* hana_rh1_clone_state : DEMOTED
* hana_rh1_roles : master1:master:worker:master
* hana_rh1_site : DC2
* hana_rh1_sra : -
* hana_rh1_srah : -
* hana_rh1_version : 2.00.078.00
* hana_rh1_vhost : node2
* master-rsc_SAPHanaCon_RH1_HDB02 : 100
Migration Summary:
Tickets:
PCSD Status:
node1: Online
node2: Online
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled
在完全健康的设置中,额外的集群属性如下所示:
SAPHanaSR-showAttr
[root]# SAPHanaSR-showAttr
Global cib-update dcid prim sec sid topology
---------------------------------------------
global 0.550.2 2 DC1 DC2 RH1 ScaleUp
Resource promotable
------------------------------------
cln_SAPHanaCon_RH1_HDB02 true
cln_SAPHanaTop_RH1_HDB02
Site lpt lss mns opMode srHook srMode srPoll srr
-------------------------------------------------------------
DC2 30 4 node2 logreplay SOK sync SOK S
DC1 1746780164 4 node1 logreplay PRIM sync PRIM P
Host clone_state roles score site srah version vhost
---------------------------------------------------------------------------------
node1 PROMOTED master1:master:worker:master 150 DC1 - 2.00.078.00 node1
node2 DEMOTED master1:master:worker:master 100 DC2 - 2.00.078.00 node2