NAS:VMWare SRP Guide: Difference between revisions

From Wiki³
Line 8: Line 8:
Not all of these steps are required for everyone, but i'm sure *someone* will appreciate them all together in one place :)
Not all of these steps are required for everyone, but i'm sure *someone* will appreciate them all together in one place :)


For the purposes of this guide, the syntax assumes you are always logged in as 'root', or have equiv privileges.
For the purposes of this guide, the syntax assumes you are always logged in as 'root'




Line 73: Line 73:
{{Console|1=
{{Console|1=
[root@NAS01 ~]$ ./mlnxofedinstall
[root@NAS01 ~]$ ./mlnxofedinstall
}}
'''Step 6:''' Validate the new Mellanox Drivers can Stop/Start
{{Console|1=
[root@NAS01 ~]$ /etc/init.d/openibd restart
Unloading HCA driver:                                      [  OK  ]
Loading HCA driver and Access Layer:                      [  OK  ]
}}
'''NOTE:''' If you get an error here, about iSCSI or SRP being 'used', and the service doesn't automagically stop and start, then you have a conflict with a 'inband' driver.  You should try and resolve that conflict, before you try and move forward.
'''Step 7:''' Validate thew new Mellanox Drivers using the supplied Self Test script
{{Console|1=
[root@NAS01 ~]$ hca_self_test.ofed
}}
Validate Output for me, looks like:
{{Console|1=
<nowiki>
---- Performing Adapter Device Self Test ----
Number of CAs Detected ................. 1
PCI Device Check ....................... PASS
Kernel Arch ............................ x86_64
Host Driver Version .................... MLNX_OFED_LINUX-3.4-2.0.0.0 (OFED-3.4-2.0.0): modules
Host Driver RPM Check .................. PASS
Firmware on CA #0 HCA .................. v2.10.0720
Host Driver Initialization ............. PASS
Number of CA Ports Active .............. 0
Error Counter Check on CA #0 (HCA)...... PASS
Kernel Syslog Check .................... PASS
Node GUID on CA #0 (HCA) ............... NA
------------------ DONE ---------------------
</nowiki>
}}
'''Step 8:''' Prepare to install the SCST Package
{{Console|1=
[root@NAS01 ~]$ yum install svn
<nowiki>[root@NAS01 ~]$ svn checkout svn://svn.code.sf.net/p/scst/svn/branches/3.2.x</nowiki>
}}
'''Step 10:''' Validate the correct ib_srpt.ko file is loaded for the module ib_srpt
{{Console|1=
[root@nas01# modinfo ib_srpt
}}
Output should look like:
{{Console|1=
filename:      <span style="color:#00a800">/lib/modules/3.10.0-514.el7.x86_64/extra/ib_srpt.ko</span><nowiki>
license:        Dual BSD/GPL
description:    InfiniBand SCSI RDMA Protocol target v3.2.x#MOFED ((not yet released))
author:        Vu Pham and Bart Van Assche
rhelversion:    7.3
srcversion:    D993FDBF1BE83A3622BF4CC
depends:        rdma_cm,ib_core,scst,mlx_compat,ib_cm,ib_mad
vermagic:      3.10.0-514.el7.x86_64 SMP mod_unload modversions
parm:          rdma_cm_port:Port number RDMA/CM will bind to. (short)
parm:          srp_max_rdma_size:Maximum size of SRP RDMA transfers for new connections. (int)
parm:          srp_max_req_size:Maximum size of SRP request messages in bytes. (int)
parm:          srp_max_rsp_size:Maximum size of SRP response messages in bytes. (int)
parm:          use_srq:Whether or not to use SRQ (bool)
parm:          srpt_srq_size:Shared receive queue (SRQ) size. (int)
parm:          srpt_sq_size:Per-channel send queue (SQ) size. (int)
parm:          use_port_guid_in_session_name:Use target port ID in the session name such that redundant paths between multiport systems can be masked. (bool)
parm:          use_node_guid_in_target_name:Use HCA node GUID as SCST target name. (bool)
parm:          srpt_service_guid:Using this value for ioc_guid, id_ext, and cm_listen_id instead of using the node_guid of the first HCA.
parm:          max_sge_delta:Number to subtract from max_sge. (uint)
</nowiki>
}}
If it looks like this, you have a problem with an 'inband' driver conflict.
{{Console|1=
<nowiki>
filename: /lib/modules/3.10.0-514.el7.x86_64/extra/mlnx-ofa_kernel/drivers/infiniband/ulp/srpt/ib_srpt.ko
version: 0.1
license: Dual BSD/GPL
description: ib_srpt dummy kernel module
author: Alaa Hleihel
rhelversion: 7.3
srcversion: 646BEB37C9062B1D74593ED
depends: mlx_compat
vermagic: 3.10.0-514.el7.x86_64 SMP mod_unload modversions​
</nowiki>
}}
}}

Revision as of 19:02, 23 January 2017

VMware SRP Guide

This wiki is meant to help people get Infiniband SRP Target working under RedHat/CentOS 7.3 to VMWare ESXi 6.0x SRP Initiator. (although the process should work under any RHEL / CentOS 7.x build)

This guide should cover all of the steps from Mellanox OFED Driver compiling/installing/configuring, to SCST compiling/installing, to adding ZFS on Linux (ZoL), and finally configuring the SCST with all of the above. As well as the few ESX steps required to remove all of the inband drivers, install the OFED drivers, and be an active SRP initiator.

Not all of these steps are required for everyone, but i'm sure *someone* will appreciate them all together in one place :)

For the purposes of this guide, the syntax assumes you are always logged in as 'root'


VMware ESX 6.0x SRP Initiator Setup

RedHat/CentOS 7.3 SRP Target Server Setup

These instructions are meant to be used with: SCST 3.2.x (latest stable branch) as well as Mellanox OFED Drivers 3.4.2 (latest) [as the time of writing]

They should be viable for Mellanox ConnectX-2/3/4 Adapters, with or without an Infiniband Switch.


The basic order you want to do things in is: Install your base OS, and update it to current. Recommendation is Minimal OS installation. Highly recommended on OS installation that, you do NOT add any of the Infiniband or iSCSI packages that come with the OS. I can't guarantee they wont get in the way somewhere down the line. There may be some development type packages that show up as missing/required when making/installing, add them manually, and retry the step.


Mellanox OFED Driver Download Page http://www.mellanox.com/page/products_dyn?product_family=26&mtag=linux_sw_drivers

My Driver Direct Download Link for RHEL/CentOS 7.3 x64 (Latest w/ OFED) http://www.mellanox.com/page/mlnx_ofed_eula?mtag=linux_sw_drivers&mrequest=downloads&mtype=ofed&mver=MLNX_OFED-3.4-2.0.0.0&mname=MLNX_OFED_LINUX-3.4-2.0.0.0-rhel7.3-x86_64.tgz


Step 1: Install the prerequisite packages required by the Mellanox OFED Driver package

# [root@NAS01 ~]$ yum install tcl tk -y


Step 2: Download the Mellanox OFED drivers (.tgz version for this guide), and put them in /tmp

# [root@NAS01 ~]$ cd /tmp

[root@NAS01 ~]$ tar xvf MLNX_OFED_LINUX-3.4-2.0.0.0-rhel7.3-x86_64.tgz

[root@NAS01 ~]$ cd /MLNX_OFED_LINUX-3.4-2.0.0.0-rhel7.3-x86_64

NOTE: If you just run the ./mnlxofedinstall script, with the latest & greatest RedHat/CentOS kernel, you will fail 'later down the road' in the SCST installation, specifically in the ib_srpt module, which is required for this exercise.


Step 3: Initially run the mlnxofedinstall script with the --add-kernel-support flag (REQUIRED)

# [root@NAS01 ~]$ ./mlnxofedinstall --add-kernel-support --without-fw-update

NOTE: This will actually take the installation package, and use it to rebuild an entirely new installation package, customized for your specific Linux kernel. Note the name and location of the new .tgz package it creates.


Step 4: Extract the new package that was just created, customized for your Linux kernel.

# [root@NAS01 ~]$ cd /tmp/MLNX_OFED_LINUX-3.4-2.0.0.0-3.10.0-514.el7.x86_64/

[root@NAS01 ~]$ tar xvf MLNX_OFED_LINUX-3.4-2.0.0.0-rhel7.3-ext.tgz

[root@NAS01 ~]$ cd MLNX_OFED_LINUX-3.4-2.0.0.0-rhel7.3-ext

NOTE: In my example I'm using the RedHat 7.3 OFED Driver, so my file names may differ from yours.Look for the -ext suffix before the .tgz extension.


Step 5: Now we can run the Mellanox OFED installation script

# [root@NAS01 ~]$ ./mlnxofedinstall


Step 6: Validate the new Mellanox Drivers can Stop/Start

# [root@NAS01 ~]$ /etc/init.d/openibd restart

Unloading HCA driver: [ OK ]

Loading HCA driver and Access Layer: [ OK ]

NOTE: If you get an error here, about iSCSI or SRP being 'used', and the service doesn't automagically stop and start, then you have a conflict with a 'inband' driver. You should try and resolve that conflict, before you try and move forward.

Step 7: Validate thew new Mellanox Drivers using the supplied Self Test script

# [root@NAS01 ~]$ hca_self_test.ofed

Validate Output for me, looks like:

#  ---- Performing Adapter Device Self Test ---- Number of CAs Detected ................. 1 PCI Device Check ....................... PASS Kernel Arch ............................ x86_64 Host Driver Version .................... MLNX_OFED_LINUX-3.4-2.0.0.0 (OFED-3.4-2.0.0): modules Host Driver RPM Check .................. PASS Firmware on CA #0 HCA .................. v2.10.0720 Host Driver Initialization ............. PASS Number of CA Ports Active .............. 0 Error Counter Check on CA #0 (HCA)...... PASS Kernel Syslog Check .................... PASS Node GUID on CA #0 (HCA) ............... NA ------------------ DONE ---------------------


Step 8: Prepare to install the SCST Package

# [root@NAS01 ~]$ yum install svn [root@NAS01 ~]$ svn checkout svn://svn.code.sf.net/p/scst/svn/branches/3.2.x



Step 10: Validate the correct ib_srpt.ko file is loaded for the module ib_srpt

# [root@nas01# modinfo ib_srpt

Output should look like:

# filename: /lib/modules/3.10.0-514.el7.x86_64/extra/ib_srpt.ko license: Dual BSD/GPL description: InfiniBand SCSI RDMA Protocol target v3.2.x#MOFED ((not yet released)) author: Vu Pham and Bart Van Assche rhelversion: 7.3 srcversion: D993FDBF1BE83A3622BF4CC depends: rdma_cm,ib_core,scst,mlx_compat,ib_cm,ib_mad vermagic: 3.10.0-514.el7.x86_64 SMP mod_unload modversions parm: rdma_cm_port:Port number RDMA/CM will bind to. (short) parm: srp_max_rdma_size:Maximum size of SRP RDMA transfers for new connections. (int) parm: srp_max_req_size:Maximum size of SRP request messages in bytes. (int) parm: srp_max_rsp_size:Maximum size of SRP response messages in bytes. (int) parm: use_srq:Whether or not to use SRQ (bool) parm: srpt_srq_size:Shared receive queue (SRQ) size. (int) parm: srpt_sq_size:Per-channel send queue (SQ) size. (int) parm: use_port_guid_in_session_name:Use target port ID in the session name such that redundant paths between multiport systems can be masked. (bool) parm: use_node_guid_in_target_name:Use HCA node GUID as SCST target name. (bool) parm: srpt_service_guid:Using this value for ioc_guid, id_ext, and cm_listen_id instead of using the node_guid of the first HCA. parm: max_sge_delta:Number to subtract from max_sge. (uint)


If it looks like this, you have a problem with an 'inband' driver conflict.

#  filename: /lib/modules/3.10.0-514.el7.x86_64/extra/mlnx-ofa_kernel/drivers/infiniband/ulp/srpt/ib_srpt.ko version: 0.1 license: Dual BSD/GPL description: ib_srpt dummy kernel module author: Alaa Hleihel rhelversion: 7.3 srcversion: 646BEB37C9062B1D74593ED depends: mlx_compat vermagic: 3.10.0-514.el7.x86_64 SMP mod_unload modversions​