搜索

5.2. 使用 sapcontrol 手动移动 ASCS 实例(启用了 SAP HA 接口)

download PDF

在为实例启用 SAP HA 接口时,验证 sapcontrol 命令是否可以将实例移到其他 HA 集群节点。

  • 测试先决条件

    • SAP 实例启用 SAP HA 接口
    • 两个集群节点都有运行 ASCSERS 的资源组。

      [root@node2: ~]# pcs status | egrep -e "S4H_ascs20|S4H_ers29"
           * S4H_ascs20 (ocf:heartbeat:SAPInstance): Started node2
           * S4H_ers29 (ocf:heartbeat:SAPInstance): Started node1
    • 已清除资源和资源组的所有故障,并且已重置故障计数。
  • 测试步骤

    • 以 & lt;sid>adm 用户身份,运行 sapcontrolHAFailoverToNode 功能,将 ASCS 实例移到其他节点。
  • 监控

    • 在测试过程中在一个单独的终端中运行以下命令:

      [root@node2]# watch -n 1 pcs status
  • 预期行为

    • ASCS 实例应该移到其他 HA 集群节点,为移动创建一个临时位置约束。
  • 测试

    [root@node2]# su - s4hadm
    node2:s4hadm 52> sapcontrol -nr 20 -function HAFailoverToNode ""
    
    06.12.2023 12:57:04
    HAFailoverToNode
    OK
  • 测试结果

    • ASCSERS 移动到其他节点:

      [root@node2]# pcs status | egrep -e "S4H_ascs20|S4H_ers29"
          * S4H_ascs20 (ocf:heartbeat:SAPInstance): Started node1
          * S4H_ers29 (ocf:heartbeat:SAPInstance): Started node2
    • 约束创建,如下所示:

      [root@node1]# pcs constraint
      Location Constraints:
        Resource: S4H_ASCS20_group
          Constraint: cli-ban-S4H_ASCS20_group-on-node2
            Rule: boolean-op=and score=-INFINITY
              Expression: #uname eq string node1
              Expression: date lt xxxx-xx-xx xx:xx:xx +xx:xx
  • 恢复过程

    • 当达到 Expression 中提到 的日期 时,上面显示的约束会被自动清除。
    • 另外,您可以使用以下命令删除约束:

      [root@node1]# pcs resource clear S4H_ascs20
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.