Configure RHEL 9.0 for NVMe-oF with ONTAP storage
Red Hat Enterpirse Linux (RHEL) hosts support the NVMe over Fibre Channel (NVMe/FC) and NVMe over TCP (NVMe/TCP) protocols with Asymmetric Namespace Access (ANA). ANA provides multipathing functionality equivalent to asymmetric logical unit access (ALUA) in iSCSI and FCP environments.
Learn how to configure NVMe over Fabrics (NVMe-oF) hosts for RHEL 9.0. For more support and feature information, see NVME-oF Overview.
NVMe-oF with RHEL 9.0 has the following known limitations:
-
SAN booting using the NVMe-oF protocol is not currently supported.
Step 1: Optionally, enable SAN booting
You can configure your host to use SAN booting to simplify deployment and improve scalability. Use the Interoperability Matrix Tool to verify that your Linux OS, host bus adapter (HBA), HBA firmware, HBA boot BIOS, and ONTAP version support SAN booting.
-
Enable SAN booting in the server BIOS for the ports to which the SAN boot namespace is mapped.
For information on how to enable the HBA BIOS, see your vendor-specific documentation.
-
Reboot the host and verify that the OS is up and running.
Step 2: Verify the software version and NVMe configuration
Check that your system meets software requirements and verify NVMe package installations and host configuration.
-
Install RHEL 9.0 on the server. After the installation is complete, verify that you are running the required RHEL 9.0 kernel:
uname -r
Example RHEL kernel version:
5.14.0-70.13.1.el9_0.x86_64
-
Install the
nvme-cli
package:rpm -qa|grep nvme-cli
The following example shows an
nvme-cli
package version:nvme-cli-1.16-3.el9.x86_64
-
Install the
libnvme
package:rpm -qa|grep libnvme
The following example shows an
libnvme
package version:libnvme-1.0-1.el9.x86_64
-
On the RHEL 9.0 host, check the
hostnqn
string at/etc/nvme/hostnqn
:cat /etc/nvme/hostnqn
The following example shows a
hostnqn
version:nqn.2014-08.org.nvmexpress:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
-
Verify that the
hostnqn
string matches thehostnqn
string for the corresponding subsystem on the ONTAP storage system:::> vserver nvme subsystem host show -vserver <vserver_name>
Show example
Vserver Subsystem Host NQN ----------- --------------- ---------------------------------------------------------- vs_nvme90 rhel_90_LPe32002 nqn.2014-08.org.nvmexpress:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
If the hostnqn strings do not match, use the vserver modify command to update the hostnqn string on your corresponding ONTAP storage system subsystem to match the hostnqn string from /etc/nvme/hostnqn on the host.
|
Step 3: Configure NVMe/FC and NVMe/TCP
Configure NVMe/FC with Broadcom/Emulex or Marvell/QLogic adapters, or configure NVMe/TCP using manual discovery and connect operations.
Configure NVMe/FC for a Broadcom/Emulex adapter.
-
Verify that you are using the supported adapter model:
-
Display the model names:
cat /sys/class/scsi_host/host*/modelname
You should see the following output:
LPe32002-M2
-
Display the model descriptions:
cat /sys/class/scsi_host/host*/modeldesc
You should see output similar to the following example:
Emulex LightPulse LPe32002-M2 2-Port 32Gb Fibre Channel Adapter
-
-
Verify that you are using the recommended Broadcom
lpfc
firmware and inbox driver:-
Display the firmware version:
cat /sys/class/scsi_host/host*/fwrev
The command returns the firmware versions:
12.8.351.47, sli-4:2:c
-
Display the inbox driver version:
cat /sys/module/lpfc/version
The following example shows a driver version:
0:14.0.0.4
For the current list of supported adapter driver and firmware versions, see the Interoperability Matrix Tool.
-
-
Verify that
lpfc_enable_fc4_type
is set to3
:cat /sys/module/lpfc/parameters/lpfc_enable_fc4_type
-
Verify that you can view your initiator ports:
cat /sys/class/fc_host/host*/port_name
You should see output similar to:
0x100000109b1c1205
-
Verify that your initiator ports are online:
cat /sys/class/fc_host/host*/port_state
You should see the following output:
Online Online
-
Verify that the NVMe/FC initiator ports are enabled and that the target ports are visible:
cat /sys/class/scsi_host/host*/nvme_info
Show example
XRI Dist lpfc0 Total 6144 IO 5894 ELS 250 NVME LPORT lpfc0 WWPN x100000109b1c1204 WWNN x200000109b1c1204 DID x011d00 ONLINE NVME RPORT WWPN x203800a098dfdd91 WWNN x203700a098dfdd91 DID x010c07 TARGET DISCSRVC ONLINE NVME RPORT WWPN x203900a098dfdd91 WWNN x203700a098dfdd91 DID x011507 TARGET DISCSRVC ONLINE NVME Statistics LS: Xmt 0000000f78 Cmpl 0000000f78 Abort 00000000 LS XMIT: Err 00000000 CMPL: xb 00000000 Err 00000000 Total FCP Cmpl 000000002fe29bba Issue 000000002fe29bc4 OutIO 000000000000000a FCP CMPL: xb 00001e15 Err 0000d906 NVME Initiator Enabled NVME LPORT lpfc1 WWPN x100000109b1c1205 WWNN x200000109b1c1205 DID x011900 ONLINE NVME RPORT WWPN x203d00a098dfdd91 WWNN x203700a098dfdd91 DID x010007 TARGET DISCSRVC ONLINE NVME RPORT WWPN x203a00a098dfdd91 WWNN x203700a098dfdd91 DID x012a07 TARGET DISCSRVC ONLINE NVME Statistics LS: Xmt 0000000fa8 Cmpl 0000000fa8 Abort 00000000 Total FCP Cmpl 000000002e14f170 Issue 000000002e14f17a OutIO 000000000000000a abort 000016bb noxri 00000000 nondlp 00000000 qdepth 00000000 wqerr 00000000 err 00000000
Configure NVMe/FC for a Marvell/QLogic adapter.
-
Verify that you are using the supported adapter driver and firmware versions:
cat /sys/class/fc_host/host*/symbolic_name
The following example shows driver and firmware versions:
QLE2742 FW:v9.06.02 DVR:v10.02.00.200-k QLE2742 FW:v9.06.02 DVR:v10.02.00.200-k
-
Verify that
ql2xnvmeenable
is set. This enables the Marvell adapter to function as an NVMe/FC initiator:cat /sys/module/qla2xxx/parameters/ql2xnvmeenable
The expected output is 1.
The NVMe/TCP protocol doesn't support the auto-connect operation. Instead, you can discover the NVMe/TCP subsystems and namespaces by performing the NVMe/TCP connect
or connect-all
operations manually.
-
Check that the initiator port can get the discovery log page data across the supported NVMe/TCP LIFs:
nvme discover -t tcp -w host-traddr -a traddr
Show example
nvme discover -t tcp -w 192.168.1.8 -a 192.168.1.51 Discovery Log Number of Records 10, Generation counter 119 =====Discovery Log Entry 0====== trtype: tcp adrfam: ipv4 subtype: nvme subsystem treq: not specified portid: 0 trsvcid: 4420 subnqn: nqn.1992-08.com.netapp:sn.56e362e9bb4f11ebbaded039ea165abc:subsystem.nvme_118_tcp_1 traddr: 192.168.2.56 sectype: none =====Discovery Log Entry 1====== trtype: tcp adrfam: ipv4 subtype: nvme subsystem treq: not specified portid: 1 trsvcid: 4420 subnqn: nqn.1992-08.com.netapp:sn.56e362e9bb4f11ebbaded039ea165abc:subsystem.nvme_118_tcp_1 traddr: 192.168.1.51 sectype: none =====Discovery Log Entry 2====== trtype: tcp adrfam: ipv4 subtype: nvme subsystem treq: not specified portid: 0 trsvcid: 4420 subnqn: nqn.1992-08.com.netapp:sn.56e362e9bb4f11ebbaded039ea165abc:subsystem.nvme_118_tcp_2 traddr: 192.168.2.56 sectype: none
-
Verify that the other NVMe/TCP initiator-target LIF combinations can successfully retrieve the discovery log page data:
nvme discover -t tcp -w host-traddr -a traddr
Show example
nvme discover -t tcp -w 192.168.1.8 -a 192.168.1.51 nvme discover -t tcp -w 192.168.1.8 -a 192.168.1.52 nvme discover -t tcp -w 192.168.2.9 -a 192.168.2.56 nvme discover -t tcp -w 192.168.2.9 -a 192.168.2.57
-
Run the
nvme connect-all
command across all the supported NVMe/TCP initiator-target LIFs across the nodes:nvme connect-all -t tcp -w host-traddr -a traddr
Show example
nvme connect-all -t tcp -w 192.168.1.8 -a 192.168.1.51 -l 1800 nvme connect-all -t tcp -w 192.168.1.8 -a 192.168.1.52 -l 1800 nvme connect-all -t tcp -w 192.168.2.9 -a 192.168.2.56 -l 1800 nvme connect-all -t tcp -w 192.168.2.9 -a 192.168.2.57 -l 1800
Step 4: Optionally, enable 1MB I/O for NVMe/FC
ONTAP reports a Max Data Transfer Size (MDTS) of 8 in the Identify Controller data. This means the maximum I/O request size can be up to 1MB. To issue I/O requests of size 1MB for a Broadcom NVMe/FC host, you should increase the lpfc
value of the lpfc_sg_seg_cnt
parameter to 256 from the default value of 64.
|
These steps don't apply to Qlogic NVMe/FC hosts. |
-
Set the
lpfc_sg_seg_cnt
parameter to 256:cat /etc/modprobe.d/lpfc.conf
You should see an output similar to the following example:
options lpfc lpfc_sg_seg_cnt=256
-
Run the
dracut -f
command, and reboot the host. -
Verify that the value for
lpfc_sg_seg_cnt
is 256:cat /sys/module/lpfc/parameters/lpfc_sg_seg_cnt
Step 5: Verify the multipathing configuration
Verify that the in-kernel NVMe multipath status, ANA status, and ONTAP namespaces are correct for the NVMe-oF configuration.
-
Verify that the in-kernel NVMe multipath is enabled:
cat /sys/module/nvme_core/parameters/multipath
You should see the following output:
Y
-
Verify that the appropriate NVMe-oF settings (such as, model set to NetApp ONTAP Controller and load balancing iopolicy set to round-robin) for the respective ONTAP namespaces correctly reflect on the host:
-
Display the subsystems:
cat /sys/class/nvme-subsystem/nvme-subsys*/model
You should see the following output:
NetApp ONTAP Controller NetApp ONTAP Controller
-
Display the policy:
cat /sys/class/nvme-subsystem/nvme-subsys*/iopolicy
You should see the following output:
round-robin round-robin
-
-
Verify that the namespaces are created and correctly discovered on the host:
nvme list
Show example
Node SN Model --------------------------------------------------------- /dev/nvme4n1 81Ix2BVuekWcAAAAAAAB NetApp ONTAP Controller Namespace Usage Format FW Rev ----------------------------------------------------------- 1 21.47 GB / 21.47 GB 4 KiB + 0 B FFFFFFFF
-
Verify that the controller state of each path is live and has the correct ANA status:
NVMe/FCnvme list-subsys /dev/nvme0n1
Show example
nvme-subsys0 - NQN=nqn.1992-08.com.netapp:sn.5f5f2c4aa73b11e9967e00a098df41bd:subsystem.nvme_141_1 \ +- nvme0 fc traddr=nn-0x203700a098dfdd91:pn-0x203800a098dfdd91 host_traddr=nn-0x200000109b1c1204:pn-0x100000109b1c1204 live inaccessible +- nvme1 fc traddr=nn-0x203700a098dfdd91:pn-0x203900a098dfdd91 host_traddr=nn-0x200000109b1c1204:pn-0x100000109b1c1204 live inaccessible +- nvme2 fc traddr=nn-0x203700a098dfdd91:pn-0x203a00a098dfdd91 host_traddr=nn-0x200000109b1c1205:pn-0x100000109b1c1205 live optimized +- nvme3 fc traddr=nn-0x203700a098dfdd91:pn-0x203d00a098dfdd91 host_traddr=nn-0x200000109b1c1205:pn-0x100000109b1c1205 live optimized
NVMe/TCPnvme list-subsys /dev/nvme0n1
Show example
nvme-subsys0 - NQN=nqn.1992-08.com.netapp:sn.56e362e9bb4f11ebbaded039ea165abc:subsystem.nvme_118_tcp_1 \ +- nvme0 tcp traddr=192.168.1.51 trsvcid=4420 host_traddr=192.168.1.8 live optimized +- nvme10 tcp traddr=192.168.2.56 trsvcid=4420 host_traddr=192.168.2.9 live optimized +- nvme15 tcp traddr=192.168.2.57 trsvcid=4420 host_traddr=192.168.2.9 live non-optimized +- nvme5 tcp traddr=192.168.1.52 trsvcid=4420 host_traddr=192.168.1.8 live non-optimized
-
Verify that the NetApp plug-in displays the correct values for each ONTAP namespace device:
Columnnvme netapp ontapdevices -o column
Show example
Device Vserver Namespace Path NSID ----------------------- ------------------------------ ------------------------- /dev/nvme0n1 814vWBNRwf9HAAAAAAAB NetApp ONTAP Controller 1 85.90 GB / 85.90 GB UUID Size -------------------------------------------- 72b887b1-5fb6-47b8-be0b-33326e2542e2 85.90GB
JSONnvme netapp ontapdevices -o json
Show example
{ "ONTAPdevices" : [ { "Device" : "/dev/nvme0n1", "Vserver" : "vs_fcnvme_141", "Namespace_Path" : "/vol/fcnvme_141_vol_1_1_0/fcnvme_141_ns", "NSID" : 1, "UUID" : "72b887b1-5fb6-47b8-be0b-33326e2542e2", "Size" : "85.90GB", "LBA_Data_Size" : 4096, "Namespace_Size" : 20971520 } ] }
Step 6: Review the known issues
These are the known issues:
NetApp Bug ID | Title | Description |
---|---|---|
RHEL 9.0 NVMe-oF hosts create duplicate Persistent Discovery Controllers (PDCs) |
On NVMe-oF hosts, you can use the "nvme discover -p" command to create PDCs. When this command is used, only one PDC should be created per initiator-target combination. However, if you are running ONTAP 9.10.1 and RHEL 9.0 with an NVMe-oF host, a duplicate PDC is created each time "nvme discover -p" is executed. This leads to unnecessary usage of resources on both the host and the target. |