Mellanox 100G NIC은 Infiniband 와 Ethernet 겸용으로 사용할 수 있음
Infiniband 로 설정된 경우, 펌웨어 유틸리티를 통해 Ethernet 으로 변경한 후 이용
리눅스 버전 확인
$ cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core)
NIC 확인 (듀얼 포트 NIC인 경우)
# lspci | grep -i mel 82:00.0 Infiniband controller: Mellanox Technologies MT27800 Family [ConnectX-5] 82:00.1 Infiniband controller: Mellanox Technologies MT27800 Family [ConnectX-5]
NIC 확인 (싱글 포트 NIC인 경우)
$ sudo lspci -vv | grep Mel -A 150 | grep -iE 'Mel|PN' 10001:01:00.0 Infiniband controller: Mellanox Technologies MT27800 Family [ConnectX-5] Subsystem: Mellanox Technologies Device 0003 [PN] Part number: MCX555A-ECAT
환경변수 영문으로
# 환경변수 확인 결과 한글로 나오는 경우 $ export | grep KR declare -x LANG="ko_KR.UTF-8" declare -x LC_ALL="ko_KR.UTF-8" # 만약 위의 결과에서 LANG 이 KR 한국어로 되어있다면 영문으로 강제로 설정 # 안 그러면 드라이버 설치 스크립트가 에러 남 # 환경변수 영어로 설정 $ export LANG=en_US.UTF-8 $ export LC_ALL=en_US.UTF-8
드라이버 설치
wget http://www.mellanox.com/downloads/ofed/MLNX_EN-4.7-3.2.9.0/mlnx-en-4.7-3.2.9.0-rhel7.6-x86_64.tgz tar zxvf mlnx-*.tgz cd mlnx-*/ sudo -s ./install
운영체제/버전에 맞는 것으로 설치;
http://www.mellanox.com/page/products_dyn?product_family=260&mtag=connectx_5_en_card
MFT 펌웨어 도구 설치
sudo yum install rpm-build wget https://www.mellanox.com/downloads/MFT/mft-4.14.0-105-x86_64-rpm.tgz tar zxvf mft*.tgz cd mft* sudo -s ./install.sh
http://www.mellanox.com/page/management_tools
MFT 펌웨어 도구 설치
# mst start # ls /dev/mst/ mt4119_pciconf0
NIC 모드 변경
# 싱글 포트인 경우 # sudo mlxconfig -d /dev/mst/mt4119_pciconf0 set LINK_TYPE_P1=2 # 듀얼 포트인 경우 # sudo mlxconfig -d /dev/mst/mt4119_pciconf0 set LINK_TYPE_P1=2 LINK_TYPE_P2=2 Device #1: ---------- Device type: ConnectX5 Name: MCX556A-ECA_Ax Description: ConnectX-5 VPI adapter card; EDR IB (100Gb/s) and 100GbE; dual-port QSFP28; PCIe3.0 x16; tall bracket; ROHS R6 Device: /dev/mst/mt4119_pciconf0 Configurations: Next Boot New LINK_TYPE_P1 IB(1) ETH(2) LINK_TYPE_P2 IB(1) ETH(2) Apply new Configuration? (y/n) [n] : y Applying... Done! -I- Please reboot machine to load new configurations.
https://community.mellanox.com/s/article/getting-started-with-connectx-5-100gb-s-adapters-for-linux
NIC 확인
# lspci | grep -i mel 82:00.0 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5] 82:00.1 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5] # ifconfig ... # ethtool ...