NVIDIA InfiniBand驱动安装

NVIDIA InfiniBand是一种数据中心、云计算、高性能计算 (HPC) 和企业数据中心的互连解决方案,提供了高带宽、低延迟的网络性能;目前Mellanox(现在已被NVIDIA收购)是这种技术的主要供应商之一。

下载IB驱动

下载地址:https://network.nvidia.com/products/infiniband-drivers/linux/mlnx_ofed/

选择对应操作系统驱动版本

img安装IB驱动

安装所需依赖以及软件

yum -y install python-devel createrepo kernel-devel redhat-rpm-config rpm-build gcc libtool patch tcl gcc-gfortran tk libusbx fuse-libs tcsh

解压IB驱动压缩包并且进入对应目录

tar -zxvf MLNX_OFED_LINUX-5.6-1.0.3.3-rhel7.9-x86_64.tgz && cd ./MLNX_OFED_LINUX-5.6-1.0.3.3-rhel7.9-x86_64

查看驱动支持的内核版本以及查看当前操作系统内核版本

cat .supported_kernels && uname -a

安装IB驱动

./mlnxofedinstall --add-kernel-support

加载模块

modprobe -rv  ib_isert rpcrdma ib_srpt xprtrdma svcrdma i40iw

启动服务

dracut -f && systemctl restart openibd && systemctl enable openibd && systemctl status openibd

配置IB的网络地址

 vim /etc/sysconfig/network-scripts/ifcfg-ib0
DEVICE=ib0
TYPE=InfiniBand
ONBOOT=yes
BOOTPROTO=static
IPADDR=100.0.241.2
NETMASK=255.255.0.0

IB精细化管理

优化文件系统IB通信解决方案

启动Mellanox的Software Tools (MST)服务

mst start

查看当前Mellanox设备的状态

mst status # 查询设备名

其中mt4119_pciconf0由上述命令查询得出

mlxconfig -d /dev/mst/mt4119_pciconf0 q | grep PCI_WR_ORDERING
mlxconfig -y -d /dev/mst/mt4119_pciconf0 s PCI_WR_ORDERING=1

改变IB工作模式

启动Mellanox的Software Tools (MST)服务

mst start

查看当前Mellanox设备的状态

mst status -v

查询设备状态及参数配置

mlxconfig -d /dev/mst/mt4123_pciconf0 q

改变网卡的工作模式,1代表IB,2代表以太;回车后需要选择y,然后重启

mlxconfig -d /dev/mst/mt4123_pciconf0 set LINK_TYPE_P1=1

关闭IB卡

查询Base lid

ibstat

关闭网卡:ib0,其中393为Base lid

ibportstate -C mlx5_0 -P 1 393 1 disable