子网管理器 (SM) 在 Mellanox InfiniBand 交换机上的高可用性 (HA)

本文详细阐述了MellanoxInfiniBand交换机上子网管理器(SM)的高可用性(HA)机制,包括SM配置同步、故障转移以及如何通过VIP进行管理和维护。重点介绍了在多交换机环境中启用SMHA的步骤和注意事项。
摘要由CSDN通过智能技术生成

了解子网管理器 (SM) 在 Mellanox InfiniBand 交换机上的高可用性 (HA)

了解 Mellanox InfiniBand 交换机上的子网管理器 (SM) 高可用性 (HA)

本文章介绍了 Mellanox InfiniBand 交换机上的 InfiniBand SM 高可用性 (HA) 同步功能。

Overview

High Availability in InfiniBand

在 InfiniBand 中,只有一个 SM 管理一个 InfiniBand 子网。不过,同一子网可以启用多个 SM。在这种情况下,其中一个 SM 将被选为子网 master SM,其余的将被禁用(standby)。如果管理员 SM 因任何原因死亡,将选举另一个 SM 来管理网络。

可能会出现什么问题呢?

SM 配置文件可能不同步。例如,假设两个 IB 节点(A 和 B)启用了 SM。如果运行在 A 节点上的 SM 死了,从 B 节点选出的新 SM 将没有该配置,因此网络可能无法像以前一样运行。

Mellanox SM HA 解决方案(Mellanox InfiniBand 交换机)

  • 在 Mellanox IB 交换机上启用 SM HA(配置同步)时,SM 数据库将与所有启用 SM 的交换机同步。
  • 同步是通过以太网带外管理口进行的。参与 SM HA 的所有交换机都应连接到同一管理子网(同一网络),而无需通过路由器。这是因为交换机发送的组播控制帧通常不经过路由器。
  • 所有参与 Mellanox SM HA 的交换机都会加入 InfiniBand 子网 ID。一旦加入,就会启动同步 SM。其中一个节点被选为 SM 主节点,其他节点为从节点。
  • SM HA 允许系统管理员使用虚拟 IP(VIP)从单一位置输入和修改不同子网管理器的所有 InfiniBand SM 配置。所有子网管理器都可以通过该 VIP 地址进行控制、启动或停止。用户应使用 VIP 地址进行 SM 配置。在主 IP 或从 IP 上配置 SM 参数的尝试将被禁用。

设置

  • InfiniBand 网络有多个交换机(至少两个)。SM HA 将在交换机上启用。要测试该功能,至少需要设置两个连接在一起的交换机。
  • 参与 SM HA 的所有交换机应具有相同的 CPU 类型(全部 x86 或全部 PPC)
  • 所有交换机应具有相同的 MLNX-OS 版本。
  • 参与 SM HA 的所有交换机都应连接到同一个管理子网(同一个网络),而无需通过路由器。

一、Mellanox SM HA Solution (Mellanox InfiniBand Switches)
When enabling SM HA (configuration synchronization) on Mellanox IB switches, the SM database is synchronized with all the switches enabled with SM.
The synchronization is done out-of-band using an Ethernet management network. All switches participating in the SM HA should be connected to the same management subnet (same network) without the need to go through a router. This is because the switches send multicast control frames that do not cross routers normally.
All the switches that participate in the Mellanox SM HA are joined to the InfiniBand subnet ID. Once joined, the synchronized SMs are launched. One of the nodes is elected as SM Master and the others are Slaves.
The SM HA allows the systems’ manager to enter and modify all InfiniBand SM configuration of the different subnet managers from a single location using a Virtual IP (VIP). All subnet managers can be controlled, started, or stopped from this VIP address. The user is expected to use the VIP address for SM configuration. Trying to configure SM parameters on a master or slave IP will be disabled.
二、实验环境
IB交换机    IP
SF6036-01    172.16.0.251
SF6036-02    172.16.0.252
三、配置
1、配置集群VIP
SF6036-01 [standalone: master] > enable
SF6036-01 [standalone: master] # config terminal
SF6036-01 [standalone: master] (config) # ib ha cluster ip 172.16.0.253 255.255.240.0                                                                                                                              
SF6036-01 [cluster: master] (config) #

2、添加第二个交换机到集群
SF6036-02 [standalone: master] (config) # ib ha cluster
SF6036-02 [cluster: standby] (config) #

3、开启集群
SF6036-01 [cluster: master] (config) # ib smnode SF6036-01 enable
SF6036-01 [cluster: master] (config) # ib smnode SF6036-02 enable

4、设置优先级(0-15)
SF6036-01 [cluster: master] (config) # ib smnode SF6036-01 sm-priority 1
SF6036-01 [cluster: master] (config) # ib smnode SF6036-02 sm-priority 2

四、查看集群
可以进行测试,断掉一台IB交换机的电源,Master会转移,且不会影响业务运行

1、查看IB高可用状态
SF6036-01 [cluster: master] (config) # show ib ha

Global HA state
==================
IB Subnet HA name: cluster
HA IP address:     172.16.0.253/20
Active HA nodes:   2

HA node local information
  Name:         SF6036-01 (active)  <--- (local node)
  SM-HA state:  master
  IP:           172.16.0.251
  Virtual switch membership:    infiniband-default

HA node local information
  Name:         SF6036-02 (active)
  SM-HA state:  standby
  IP:           172.16.0.252
  Virtual switch membership:    infiniband-default

SF6036-01 [cluster: master] (config) # show ib ha brief

Global HA state
==================
IB Subnet HA name: cluster
HA IP address:     172.16.0.253/20
Active HA nodes:   2

 ID                   SM-HA state   IP              Virtual switch membership
--------------------------------------------------------------------------------
*SF6036-01            master        172.16.0.251    infiniband-default
 SF6036-02            standby       172.16.0.252    infiniband-default

2、查看IB SM状态
SF6036-01 [cluster: master] (config) # show ib smnodes

HA state of switch infiniband-default
========================================
IB Subnet HA name: cluster
HA IP address:     172.16.0.253/20
Active HA nodes:   2

HA node local information
  Name:         SF6036-01 (active)  <--- (local node)
  SM-HA state:  master
  SM Licensed:  yes
  SM Running:   running
  SM Enabled:   enabled - master
  SM Priority:  1
  IP:           172.16.0.251

HA node local information
  Name:         SF6036-02 (active)
  SM-HA state:  standby
  SM Licensed:  yes
  SM Running:   running
  SM Enabled:   enabled
  SM Priority:  2
  IP:           172.16.0.252

3、连接查看状态
此时我们可以通过172.16.0.253(VIP)进行连接!!!


保存配置信息(也可以在界面上面点击save保存):

SF6036-01 [cluster-6036: master] (config) # write memory
SF6036-02 [cluster-6036: standby] (config) # write memory
————————————————
版权声明:本文为CSDN博主「Wielun」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/Dream_ya/article/details/101196641


 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值