集群配置 - SAP HANA 开启 Amazon
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

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

集群配置

更新用户hacluster密码

更改两个节点haclustser上的用户密码,如以下示例所示:

[root@prihana ~] passwd hacluster
[root@sechana ~] passwd hacluster

启动并启用pcs服务

以下命令在两个节点上启动和启用pcs服务:

[root@prihana ~] systemctl start pcsd.service
[root@prihana ~] systemctl enable pcsd.service

使用用户 hacluster 对电脑进行身份验证

以下命令pcs向集群中节点pcs上的守护程序进行身份验证。两个节点hacluster上的pcs管理用户名必须使用相同的密码。

RHEL 7.x

[root@prihana ~] pcs cluster auth prihana sechana
Username: hacluster
Password:
sechana: Authorized
prihana: Authorized
[root@prihana ~]

RHEL 8.x

[root@<host1> ~] pcs host auth prihana sechana
Username: hacluster
Password:
sechana: Authorized
prihana: Authorized
[root@<host1> ~]

查看与集群操作冲突的实例设置

为确保重启是可预测的,我们建议禁用简化的自动恢复,不要为属于 pacemaker 集群的实例配置基于 Amazon CloudWatch 操作的恢复。使用以下命令禁用简化的自动恢复。

aws ec2 modify-instance-maintenance-options --instance-id i-0abcdef1234567890 --auto-recovery disabled

您必须确保对属于起搏器集群的 Amazon EC2 实例禁用停止保护。使用以下命令禁用停止保护。

aws ec2 modify-instance-attribute --instance-id i-1234567890abcdef0 --no-disable-api-stop

设置集群

以下命令配置群集配置文件并同步两个节点上的配置。

pcs cluster setup –name rhelhanaha prihana sechana

[rooteprihana~]pcs cluster setup --name rhelhanaha prihana sechana
Destroying cluster on nodes: prihana, sechana...
sechana: Stopping Cluster (pacemaker)...
prihana: Stopping Cluster (pacemaker)...
sechana: Successfully destroyed cluster
prihana: Successfully destroyed cluster
Sending 'pacemaker_remote authkey' to iprihana', 'sechana' prihana:
successful distribution of the file 'pacemaker remote authkey'
sechana: successful distribution of the file 'pacemaker_remote authkey'
Sending cluster config files to the nodes...
prihana: Succeeded
sechana: Succeeded
Synchronizing pcsd certificates on nodes prihana, sechana... saphdbdbe2: Success
prihana: Success
Restarting pcsd on the nodes in order to reload the certificates... sechana: Success
prihana: Success

启用并启动集群

以下命令启用和启动集群:

pcs cluster enable –all

root@prihana etc] pcs cluster enable --all
prihana: Cluster Enabled
sechana: Cluster Enabled
pcs cluster start –all

[root@prihana etc] pcs cluster start --all
prihana: Starting Cluster (corosync)...
sechana: Starting Cluster (corosync)...
sechana: Starting Cluster (pacemaker)...
prihana: Starting Cluster (pacemaker)...
[rooteprihana etc] I

增加 corosync 图腾令牌超时时间

RHEL 7.x

  1. 编辑所有群集节点中的/etc/corosync/corosync.conf文件并增加或添加令牌的值,如以下示例所示。

    totem {
        version: 2
        secauth: off
        cluster_name: my-rhel-sap-cluster
        transport: udpu
        rrp_mode: passive
        token: 30000  <------ Value to be set
    }
  2. 只需在一个群集节点中运行以下命令即可重新加载。corosync这不需要任何停机时间。

     pcs cluster reload corosync
  3. 运行以下命令以确认您的更改处于活动状态。

     corosync-cmapctl | grep totem.token
    Runtime.config.totem.token (u32) = 30000

RHEL 8.x

运行以下命令以延长corosync令牌超时时间。

 pcs cluster config update totem token=29000