实验环境:
操作系统:SLES11 SP1 X86_64
一:首先根据系统发行版本下载对应的驱动,下载地址如下:
http://www.mellanox.com/page/products_dyn?product_family=26&mtag=linux_sw_drivers
本次下载的驱动版本为:MLNX_OFED_LINUX-1.5.3-4.0.42-sles11-x86_64.tgz
二:添加针对当前内核的IB驱动
1.把下载好的mellanox驱动解压缩
linux:~ # tar xzvf MLNX_OFED_LINUX-1.5.3-4.0.42-sles11-x86_64.tgz
linux:~ # cd MLNX_OFED_LINUX-1.5.3-4.0.42-sles11-x86_64/
linux:~/MLNX_OFED_LINUX-1.5.3-4.0.42-sles11-x86_64# ll
total 228
-rw-r--r-- 1 root root 7 May 1 2013.arch
-rw-r--r-- 1 root root 13 May 1 2013.mlnx
-rw-r--r-- 1 root root 72 May 1 2013.supported_kernels
drwxr-xr-x 2 root root 12288 May 1 2013RPMS
drwxr-xr-x 8 root root 4096 May 1 2013docs
drwxr-xr-x 5 2666 messagebus 4096 Apr 17 2013 firmware
-rwxr-xr-x 1 root root 11234 May 1 2013mlnx_add_kernel_support.sh
-rwxr-xr-x 1 root root 161517 May 1 2013mlnxofedinstall
drwxr-xr-x 2 root root 4096 May 1 2013repodata
drwxr-xr-x 2 root root 4096 May 1 2013src
-rwxr-xr-x 1 root root 9790 May 1 2013uninstall.sh
linux:~/MLNX_OFED_LINUX-1.5.3-4.0.42-sles11-x86_64#
2.查看当前驱动所支持的内核版本
linux:~/MLNX_OFED_LINUX-1.5.3-4.0.42-sles11-x86_64# cat .supported_kernels
2.6.27.19-5-debug
2.6.27.19-5-default
2.6.27.19-5-trace
2.6.27.19-5-xen
linux:~/MLNX_OFED_LINUX-1.5.3-4.0.42-sles11-x86_64#
3.查看当前系统内核版本
linux:~/MLNX_OFED_LINUX-1.5.3-4.0.42-sles11-x86_64# uname -r
2.6.32.12-0.7-default
linux:~/MLNX_OFED_LINUX-1.5.3-4.0.42-sles11-x86_64#
注:由以上可知下载的默认驱动不支持当前的内核版本
4.添加针对当前内核版本的IB驱动
◆在编译之前首先安装gcc编译环境和kernel开发包
linux:~/MLNX_OFED_LINUX-1.5.3-4.0.42-sles11-x86_64# zypper install gcc gcc-c++
libstdc++-devel kernel-default-devel
◆添加针对当前内核版本的驱动
linux:~/MLNX_OFED_LINUX-1.5.3-4.0.42-sles11-x86_64#./mlnx_add_kernel_support.sh -m /root/MLNX_OFED_LINUX-1.5.3-4.0.42-sles11-x86_64 -v
注:完成后生成的驱动文件在/tmp目录下
linux:~/MLNX_OFED_LINUX-1.5.3-4.0.42-sles11-x86_64# ls -l /tmp/MLNX_OFED_LINUX-1.5.3-4.0.42-sles11sp1-x86_64.tgz
-rw-r--r-- 1 rootroot 238440971 Dec 17 04:43/tmp/MLNX_OFED_LINUX-1.5.3-4.0.42-sles11sp1-x86_64.tgz
linux:~/MLNX_OFED_LINUX-1.5.3-4.0.42-sles11-x86_64#
◆安装驱动
linux:/tmp # pwd
/tmp
linux:/tmp # tar xzvf MLNX_OFED_LINUX-1.5.3-4.0.42-sles11sp1-x86_64.tgz
linux:/tmp # cd MLNX_OFED_LINUX-1.5.3-4.0.42-sles11sp1-x86_64/
linux:/tmp/MLNX_OFED_LINUX-1.5.3-4.0.42-sles11sp1-x86_64# ./mlnxofedinstall
注:如果系统缺少libgfortran43,在安装的时候会提示以下信息(最好是安装,不安装也行,只是不能运行openshmem和openmpi_gcc)
Warning: libgfortran43 rpm is required to runopenshmem
libgfortran43 is available on SLES11 SDK DVD
Warning: libgfortran43 rpm is required to run openmpi_gcc
libgfortran43 is available on SLES11 SDK DVD
◆最后启动openibd服务
linux:~ #/etc/init.d/openibd start
linux:~ #chkconfig openibd on
本文出自 “永不止步” 博客,谢绝转载!
原文地址:http://wjcaiyf.blog.51cto.com/7105309/1591062