搜索

第 5 章 测试集群配置

download PDF

在生产环境中放置 HA 集群设置前,建议执行以下测试,以确保 HA 集群设置按预期工作。

这些测试还应作为常规 HA/DR 深入的一部分重复,以确保集群仍按预期工作,并且管理员熟悉将设置恢复到正常操作过程中出现正常状态的流程,或者需要手动维护设置。

5.1. 使用 pcs 命令手动移动 ASCS 实例

验证 pacemaker 集群是否能够按需将实例移到其他 HA 集群节点。

  • 测试先决条件

    • 两个集群节点都在线,在不同 HA 集群节点上运行的 ASCSERS 的资源组:

        * Resource Group: S4H_ASCS20_group:
          * S4H_lvm_ascs20    (ocf:heartbeat:LVM-activate):    Started node1
          * S4H_fs_ascs20     (ocf:heartbeat:Filesystem): Started node1
          * S4H_vip_ascs20    (ocf:heartbeat:IPaddr2):         Started node1
          * S4H_ascs20        (ocf:heartbeat:SAPInstance):     Started node1
        * Resource Group: S4H_ERS29_group:
          * S4H_lvm_ers29     (ocf:heartbeat:LVM-activate):    Started node2
          * S4H_fs_ers29 (ocf:heartbeat:Filesystem): Started node2
          * S4H_vip_ers29     (ocf:heartbeat:IPaddr2):         Started node2
          * S4H_ers29 (ocf:heartbeat:SAPInstance):     Started node2
    • 已清除资源和资源组的所有故障,并且已重置故障计数。
  • 测试步骤

    • 从任何节点运行以下命令,将 ASCS 实例移动到其他 HA 集群节点:

      [root@node1]# pcs resource move S4H_ascs20
  • 监控

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

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

    • ASCS 资源组移到其他节点。
    • ERS 资源组会在此后停止,并移到运行 ASCS 资源组的节点。
  • test Result

    • ASCS 资源组移动到其他节点,在这种情况下,节点 node2 和 ERS 资源组移到节点 node1 :

        * Resource Group: S4H_ASCS20_group:
          * S4H_lvm_ascs20 (ocf:heartbeat:LVM-activate): Started node2
          * S4H_fs_ascs20 (ocf:heartbeat:Filesystem): Started node2
          * S4H_vip_ascs20 (ocf:heartbeat:IPaddr2): Started node2
          * S4H_ascs20 (ocf:heartbeat:SAPInstance): Started node2
        * Resource Group: S4H_ERS29_group:
          * S4H_lvm_ers29 (ocf:heartbeat:LVM-activate): Started node1
          * S4H_fs_ers29 (ocf:heartbeat:Filesystem): Started node1
          * S4H_vip_ers29 (ocf:heartbeat:IPaddr2): Started node1
          * S4H_ers29 (ocf:heartbeat:SAPInstance): Started node1
  • 恢复过程:

    • 删除位置限制(若有):

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

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

© 2024 Red Hat, Inc.