资源清理活动 - 上的 SAP HANAAmazon
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 Amazon Web Services 服务入门

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

资源清理活动

使用以下命令清理失败的操作:

pcs resource cleanup <resource> --node <node-name>
[root@prihana ~]# pcs resource cleanup SAPHana_HDB_00 --node prihana Cleaned up SAPHana_HDB_00:0 on prihana Cleaned up SAPHana_HDB_00:1 on prihana Waiting for 1 replies from the CRMd. OK [root@prihana ~]#
[root@prihana ~]#pcs status Thu Nov 12 10:45:14 2020 Cluster name: rhelhanaha Stack: corosync Current DC: sechana (version 1.1.19-8.el7_6.5-c3c624ea3d) - partition with quorum Last updated: Thu Nov 12 10:45:14 2020 Last change: Thu Nov 12 10:45: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 prihana Clone Set: SAPHanaTopology_HDB_00-clone [SAPHanaTopology_HDB_00] Started: [ prihana sechana ] Master/Slave Set: SAPHana_HDB_00-master [SAPHana_HDB_00] Masters: [ sechana ] Stopped: [ prihana ] hana-oip (ocf::heartbeat:aws-vpc-move-ip): Started sechana Daemon Status: corosync: active/enabled pacemaker: active/enabled pcsd: active/enabled

手动将资源从一个节点迁移到另一个节点(如前一节所示)将在pcs配置”pcs config show”。

root@prihana ~]# pcs config show Cluster Name: rhelhanaha Corosync Nodes: prihana sechana Pacemaker Nodes: prihana sechana Resources: Clone: SAPHanaTopology_HDB_00-clone Meta Attrs: clone-max=2 clone-node-max=1 interleave=true Resource: SAPHanaTopology_HDB_00 (class=ocf provider=heartbeat type=SAPHanaTopology) Attributes: InstanceNumber=00 SID=HDB Operations: methods interval=0s timeout=5 (SAPHanaTopology_HDB_00-methods-interval-0s) monitor interval=10 timeout=600 (SAPHanaTopology_HDB_00-monitor-interval-10) reload interval=0s timeout=5 (SAPHanaTopology_HDB_00-reload-interval-0s) start interval=0s timeout=600 (SAPHanaTopology_HDB_00-start-interval-0s) stop interval=0s timeout=300 (SAPHanaTopology_HDB_00-stop-interval-0s) Master: SAPHana_HDB_00-master Meta Attrs: clone-max=2 clone-node-max=1 interleave=true notify=true Resource: SAPHana_HDB_00 (class=ocf provider=heartbeat type=SAPHana) Attributes: AUTOMATED_REGISTER=true DUPLICATE_PRIMARY_TIMEOUT=7200 InstanceNumber=00 PREFER_SITE_TAKEOVER=true SID=HDB Operations: demote interval=0s timeout=3600 (SAPHana_HDB_00-demote-interval-0s) methods interval=0s timeout=5 (SAPHana_HDB_00-methods-interval-0s) monitor interval=61 role=Slave timeout=700 (SAPHana_HDB_00-monitor-interval-61) monitor interval=59 role=Master timeout=700 (SAPHana_HDB_00-monitor-interval-59) promote interval=0s timeout=3600 (SAPHana_HDB_00-promote-interval-0s) reload interval=0s timeout=5 (SAPHana_HDB_00-reload-interval-0s) start interval=0s timeout=3600 (SAPHana_HDB_00-start-interval-0s) stop interval=0s timeout=3600 (SAPHana_HDB_00-stop-interval-0s) Resource: hana-oip (class=ocf provider=heartbeat type=aws-vpc-move-ip) Attributes: interface=eth0 ip=192.168.1.99 routing_table=rtb-0027679b7a9eff404 Operations: monitor interval=60s timeout=30s (hana-oip-monitor-interval-60s) start interval=0s timeout=180s (hana-oip-start-interval-0s) stop interval=0s timeout=180s (hana-oip-stop-interval-0s) Stonith Devices: Resource: clusterfence (class=stonith type=fence_aws) Attributes: pcmk_host_map=prihana:i-01b7ceb0d8799eccf;sechana:i-05b924af2f83ffe0b pcmk_reboot_retries=4 pcmk_reboot_timeout=480 power_timeout=240 region=us-east-1 Operations: monitor interval=60s (clusterfence-monitor-interval-60s) Fencing Levels: Location Constraints: Ordering Constraints: start SAPHanaTopology_HDB_00-clone then start SAPHana_HDB_00-master (kind:Mandatory) (non-symmetrical) Colocation Constraints: hana-oip with SAPHana_HDB_00-master (score:2000) (rsc-role:Started) (with-rsc-role:Master) Ticket Constraints: Alerts: No alerts defined Resources Defaults: resource-stickiness: 1000 migration-threshold: 5000 Operations Defaults: No defaults set Cluster Properties: cluster-infrastructure: corosync cluster-name: rhelhanaha dc-version: 1.1.19-8.el7_6.5-c3c624ea3d have-watchdog: false last-lrm-refresh: 1605053571 Node Attributes: prihana: hana_hdb_op_mode=logreplay hana_hdb_remoteHost=sechana hana_hdb_site=HDBPrimary hana_hdb_srmode=syncmem hana_hdb_vhost=prihana lpa_hdb_lpt=1605196167 sechana: hana_hdb_op_mode=logreplay hana_hdb_remoteHost=prihana hana_hdb_site=HDBSecondary hana_hdb_srmode=syncmem hana_hdb_vhost=sechana lpa_hdb_lpt=30 Quorum: Options: [root@prihana ~]

在使用以下命令执行任何其他集群操作之前,需要清理这些位置约束:

pcs constraint remove constaint-id
[root@prihana ~]# pcs constraint list --full Location Constraints: Ordering Constraints: start SAPHanaTopology_HDB_00-clone then start SAPHana_HDB_00-master (kind:Mandatory) (non-symmetrical) (id:order-SAPHanaTopology_HDB_00- clone-SAPHana_HDB_00-master-mandatory) Colocation Constraints: hana-oip with SAPHana_HDB_00-master (score:2000) (rsc-role:Started) (with-rsc-role:Master) (id:colocation-hana-oip-SAPHana_HDB_00-master-2000) Ticket Constraints: [root@prihana ~]# root@prihana ~]# pcs constraint remove colocation-hana-oip-SAPHana_HDB_00-master-2000 [root@prihana ~]# pcs constraint list --full Location Constraints: Ordering Constraints: start SAPHanaTopology_HDB_00-clone then start SAPHana_HDB_00-master (kind:Mandatory) (non-symmetrical) (id:order-SAPHanaTopology_HDB_00-clone- SAPHana_HDB_00-master-mandatory) Colocation Constraints: Ticket Constraints: [root@prihana ~]#