在主机端设置基于 InfiniBand 的 NVMe
在 InfiniBand 环境中配置 NVMe 启动程序包括安装和配置 InfiniBand , NVMe-CLI 和 RDMA 软件包,配置启动程序 IP 地址以及在主机上设置 NVMe-oF 层。
您必须运行最新兼容的RHEL 7、RHEL 8、RHEL 9、SUSE Linux Enterprise Server 12或15 Service Pack操作系统。请参见 "NetApp 互操作性表工具" 有关最新要求的完整列表。
-
安装 RDMA , NVMe-CLI 和 InfiniBand 软件包:
-
SLES 12 或 SLES 15*
# zypper install infiniband-diags # zypper install rdma-core # zypper install nvme-cli
-
RHEL 7、RHEL 8或RHEL 9*
# yum install infiniband-diags # yum install rdma-core # yum install nvme-cli
-
-
对于RHEL 8或RHEL 9、安装网络脚本:
-
RHEL 8*
# yum install network-scripts
-
RHEL 9*
# yum install NetworkManager-initscripts-updown
-
-
对于RHEL 7、启用
ipoib
。编辑/etc/rdma/Rdma.conf文件并修改要加载的条目ipoib
:IPOIB_LOAD=yes
-
获取主机NQN、该主机将用于为阵列配置主机。
# cat /etc/nvme/hostnqn
-
检查两个IB端口链路是否均已启动且状态=活动:
# ibstat
CA 'mlx4_0' CA type: MT4099 Number of ports: 2 Firmware version: 2.40.7000 Hardware version: 1 Node GUID: 0x0002c90300317850 System image GUID: 0x0002c90300317853 Port 1: State: Active Physical state: LinkUp Rate: 40 Base lid: 4 LMC: 0 SM lid: 4 Capability mask: 0x0259486a Port GUID: 0x0002c90300317851 Link layer: InfiniBand Port 2: State: Active Physical state: LinkUp Rate: 56 Base lid: 5 LMC: 0 SM lid: 4 Capability mask: 0x0259486a Port GUID: 0x0002c90300317852 Link layer: InfiniBand
-
在 IB 端口上设置 IPv4 IP 地址。
-
SLES 12 或 SLES 15*
使用以下内容创建文件 /etc/sysconfig/network/ifcfg-ib0 。
BOOTPROTO='static' BROADCAST= ETHTOOL_OPTIONS= IPADDR='10.10.10.100/24' IPOIB_MODE='connected' MTU='65520' NAME= NETWORK= REMOTE_IPADDR= STARTMODE='auto'
然后、创建文件/etc/sysconfig/network/ifcfg-ib1:
BOOTPROTO='static' BROADCAST= ETHTOOL_OPTIONS= IPADDR='11.11.11.100/24' IPOIB_MODE='connected' MTU='65520' NAME= NETWORK= REMOTE_IPADDR= STARTMODE='auto'
-
RHEL 7 或 RHEL 8*
使用以下内容创建文件 /etc/sysconfig/network-scripts/ifcfg-ib0 。
CONNECTED_MODE=no TYPE=InfiniBand PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=static IPADDR='10.10.10.100/24' DEFROUTE=no IPV4=FAILURE_FATAL=yes IPV6INIT=no NAME=ib0 ONBOOT=yes
然后,创建文件 /etc/sysconfig/network-scripts/ifcfg-ib1 :
CONNECTED_MODE=no TYPE=InfiniBand PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=static IPADDR='11.11.11.100/24' DEFROUTE=no IPV4=FAILURE_FATAL=yes IPV6INIT=no NAME=ib1 ONBOOT=yes
-
RHEL 9*
使用
nmtui
用于激活和编辑连接的工具。下面是一个示例文件/etc/NetworkManager/system-connections/ib0.nmconnection
该工具将生成:[connection] id=ib0 uuid=<unique uuid> type=infiniband interface-name=ib0 [infiniband] mtu=4200 [ipv4] address1=10.10.10.100/24 method=manual [ipv6] addr-gen-mode=default method=auto [proxy]
下面是一个示例文件
/etc/NetworkManager/system-connections/ib1.nmconnection
该工具将生成:
[connection] id=ib1 uuid=<unique uuid> type=infiniband interface-name=ib1 [infiniband] mtu=4200 [ipv4] address1=11.11.11.100/24' method=manual [ipv6] addr-gen-mode=default method=auto [proxy]
-
-
启用
IB
接口:# ifup ib0 # ifup ib1
-
验证要用于连接到阵列的 IP 地址。对
ib0
和ib1
运行以下命令:# ip addr show ib0 # ip addr show ib1
如以下示例所示,
ib0
的 IP 地址为10.10.10.255
。10: ib0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65520 qdisc pfifo_fast state UP group default qlen 256 link/infiniband 80:00:02:08:fe:80:00:00:00:00:00:00:00:02:c9:03:00:31:78:51 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff inet 10.10.10.255 brd 10.10.10.255 scope global ib0 valid_lft forever preferred_lft forever inet6 fe80::202:c903:31:7851/64 scope link valid_lft forever preferred_lft forever
如以下示例所示,
ib1
的 IP 地址为11.11.11.255
。10: ib1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65520 qdisc pfifo_fast state UP group default qlen 256 link/infiniband 80:00:02:08:fe:80:00:00:00:00:00:00:00:02:c9:03:00:31:78:51 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff inet 11.11.11.255 brd 11.11.11.255 scope global ib0 valid_lft forever preferred_lft forever inet6 fe80::202:c903:31:7851/64 scope link valid_lft forever preferred_lft forever
-
在主机上设置 NVMe-oF 层。在/etc/mods-load.d/下创建以下文件以加载
nvme_rdma
内核模块并确保内核模块始终处于打开状态、即使在重新启动后也是如此:# cat /etc/modules-load.d/nvme_rdma.conf nvme_rdma
-
重新启动主机。
以验证
nvme_rdma
内核模块已加载、请运行以下命令:# lsmod | grep nvme nvme_rdma 36864 0 nvme_fabrics 24576 1 nvme_rdma nvme_core 114688 5 nvme_rdma,nvme_fabrics rdma_cm 114688 7 rpcrdma,ib_srpt,ib_srp,nvme_rdma,ib_iser,ib_isert,rdma_ucm ib_core 393216 15 rdma_cm,ib_ipoib,rpcrdma,ib_srpt,ib_srp,nvme_rdma,iw_cm,ib_iser,ib_umad,ib_isert,rdma_ucm,ib_uverbs,mlx5_ib,qedr,ib_cm t10_pi 16384 2 sd_mod,nvme_core