在主機端設定NVMe over InfiniBand
在InfiniBand環境中設定NVMe啟動器、包括安裝及設定InfiniBand、NVMe-CLI和RDMA套件、設定啟動器IP位址、以及在主機上設定NVMe層。
您必須執行最新的相容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.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層。在 /etc/modules-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