Skip to main content
SAN hosts and cloud clients

NVMe-oF host configuration for RHEL 9.2 with ONTAP

Contributors netapp-ranuk netapp-pcarriga

NVMe over Fabrics (NVMe-oF), including NVMe over Fibre Channel (NVMe/FC) and other transports, is supported with Red Hat Enterprise Linux (RHEL) 9.2 with Asymmetric Namespace Access (ANA). In NVMe-oF environments, ANA is the equivalent of ALUA multipathing in iSCSI and FC environments and is implemented with in-kernel NVMe multipath.

The following support is available for the NVMe-oF host configuration for RHEL 9.2 with ONTAP:

  • Support for NVMe over TCP (NVMe/TCP) in addition to NVMe/FC. The NetApp plug-in in the native nvme-cli package displays ONTAP details for both NVMe/FC and NVMe/TCP namespaces.

  • Use of NVMe and SCSI co-existent traffic on the same host on a given host bus adapter (HBA), without the explicit dm-multipath settings to prevent claiming NVMe namespaces.

For additional details on supported configurations, see the NetApp Interoperability Matrix Tool.

Features

  • RHEL 9.2 has in-kernel NVMe multipath enabled for NVMe namespaces by default, therefore, there is no need for explicit settings.

Known limitations

SAN booting using the NVMe-oF protocol is currently not supported.

Validate software versions

You can use the following procedure to validate the minimum supported RHEL 9.2 software versions.

Steps
  1. Install RHEL 9.2 on the server. After the installation is complete, verify that you are running the specified RHEL 9.2 kernel.

    # uname -r

    Example output:

    5.14.0-284.11.1.el9_2.x86_64
  2. Install the nvme-cli package:

    # rpm -qa|grep nvme-cli

    Example output:

    nvme-cli-2.2.1-2.el9.x86_64
  3. Install the libnvme package:

    #rpm -qa|grep libnvme

    Example output

    libnvme-1.2-2.el9.x86_64
  4. On the RHEL 9.2 host, check the hostnqn string at /etc/nvme/hostnqn:

    # cat /etc/nvme/hostnqn

    Example output

    nqn.2014-08.org.nvmexpress:uuid:4c4c4544-0032-3310-8033-b8c04f4c5132
  5. Verify that the hostnqn string matches the hostnqn string for the corresponding subsystem on the ONTAP array:

    ::> vserver nvme subsystem host show -vserver vs_ol_nvme

    Example output:

    Vserver     Subsystem          Host NQN
    ----------- --------------- ----------------------------------------------------------
    vs_nvme207   rhel_207_LPe32002    nqn.2014-08.org.nvmexpress:uuid:325e7554-1f9b-11ec-8489-3a68dd61a4df
    Note If the hostnqn strings do not match, use the vserver modify command to update the hostnqn string on your corresponding ONTAP array subsystem to match the hostnqn string from /etc/nvme/hostnqn on the host.

Configure NVMe/FC

You can configure NVMe/FC for Broadcom/Emulex or Marvell/Qlogic adapters.

Broadcom/Emulex
Steps
  1. Verify that you are using the supported adapter model.

    # cat /sys/class/scsi_host/host*/modelname

    Example output:

    LPe32002-M2
    LPe32002-M2
    # cat /sys/class/scsi_host/host*/modeldesc

    Example output:

    Emulex LightPulse LPe32002-M2 2-Port 32Gb Fibre Channel Adapter
    Emulex LightPulse LPe32002-M2 2-Port 32Gb Fibre Channel Adapter
  2. Verify that you are using the recommended Broadcom lpfc firmware and inbox driver.

    # cat /sys/class/scsi_host/host*/fwrev
    14.0.639.18, sli-4:2:c
    14.0.639.18, sli-4:2:c
    
    # cat /sys/module/lpfc/version
    0:12.8.0.11

    For the most current list of supported adapter driver and firmware versions, see the NetApp Interoperability Matrix Tool.

  3. Verify that lpfc_enable_fc4_type is set to 3:

    # cat /sys/module/lpfc/parameters/lpfc_enable_fc4_type
    3
  4. Verify that the initiator ports are up and running and that you can see the target LIFs:

    # cat /sys/class/fc_host/host*/port_name
    0x100000109b1c1204
    0x100000109b1c1205
    # cat /sys/class/fc_host/host*/port_state
    Online
    Online
    # cat /sys/class/scsi_host/host*/nvme_info
    NVME Initiator Enabled
    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
    abort 00001bc7 noxri 00000000 nondlp 00000000 qdepth 00000000 wqerr 00000000 err 00000000
    FCP CMPL: xb 00001e15 Err 0000d906
    NVME Initiator Enabled
    XRI Dist lpfc1 Total 6144 IO 5894 ELS 250
    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
    LS XMIT: Err 00000000 CMPL: xb 00000000 Err 00000000
    Total FCP Cmpl 000000002e14f170 Issue 000000002e14f17a OutIO 000000000000000a
    abort 000016bb noxri 00000000 nondlp 00000000 qdepth 00000000 wqerr 00000000 err 00000000
    FCP CMPL: xb 00001f50 Err 0000d9f8
Marvell/QLogic FC Adapter for NVMe/FC

The native inbox qla2xxx driver included in the RHEL 9.2 GA kernel has the latest upstream fixes. These fixes are essential for ONTAP support.

Steps
  1. Verify that you are running the supported adapter driver and firmware versions:

    # cat /sys/class/fc_host/host*/symbolic_name

    Example output

    QLE2742 FW:v9.08.02 DVR:v10.02.00.106-k
    QLE2742 FW:v9.08.02 DVR:v10.02.00.106-k
  2. Verify that ql2xnvmeenable is set. This enables the Marvell adapter to function as an NVMe/FC initiator:

    # cat /sys/module/qla2xxx/parameters/ql2xnvmeenable
    1

Enable 1MB I/O (Optional)

ONTAP reports an MDTS (Max Data Transfer Size) 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 1 MB for a Broadcom NVMe/FC host, you must increase the lpfc value of the lpfc_sg_seg_cnt parameter to 256 from the default value of 64.

Note The following steps don't apply to Qlogic NVMe/FC hosts.
Steps
  1. Set the lpfc_sg_seg_cnt parameter to 256:

    cat /etc/modprobe.d/lpfc.conf
    Example output
    options lpfc lpfc_sg_seg_cnt=256
  2. Run the dracut -f command, and reboot the host:

  3. Verify that lpfc_sg_seg_cnt is 256:

    cat /sys/module/lpfc/parameters/lpfc_sg_seg_cnt

    The expected value is 256.

Configure NVMe/TCP

NVMe/TCP does not have auto-connect functionality. Therefore, if a path goes down and is not reinstated within the default time out period of 10 minutes, NVMe/TCP cannot automatically reconnect. To prevent a time out, you should set the retry period for failover events to at least 30 minutes.

Steps
  1. Verify that the initiator port can fetch the discovery log page data across the supported NVMe/TCP LIFs:

    nvme discover -t tcp -w host-traddr -a traddr

    Example output:

    # nvme discover -t tcp -w 192.168.167.5 -a 192.168.167.22
    
    Discovery Log Number of Records 8, Generation counter 18
    =====Discovery Log Entry 0======
    trtype:  tcp
    adrfam:  ipv4
    subtype: current discovery subsystem
    treq:    not specified
    portid:  0
    trsvcid: 8009
    subnqn:  nqn.1992-08.com.netapp:sn.c680f5bcae1411ed8639d039ea951c46:discovery
    traddr:  192.168.166.23
    eflags:  explicit discovery connections, duplicate discovery information
    sectype: none
    =====Discovery Log Entry 1======
    trtype:  tcp
    adrfam:  ipv4
    subtype: current discovery subsystem
    treq:    not specified
    portid:  1
    trsvcid: 8009
    subnqn:  nqn.1992-08.com.netapp:sn.c680f5bcae1411ed8639d039ea951c46:discovery
    traddr:  192.168.166.22
    eflags:  explicit discovery connections, duplicate discovery information
    sectype: none
    =====Discovery Log Entry 2======
    trtype:  tcp
    adrfam:  ipv4
    subtype: current discovery subsystem
    treq:    not specified
    portid:  2
    trsvcid: 8009
    subnqn:  nqn.1992-08.com.netapp:sn.c680f5bcae1411ed8639d039ea951c46:discovery
    traddr:  192.168.167.23
    eflags:  explicit discovery connections, duplicate discovery information
    sectype: none
    ..........
  2. Verify that the other NVMe/TCP initiator-target LIF combinations are able to successfully fetch discovery log page data.

    nvme discover -t tcp -w host-traddr -a traddr

    Example output:

    #nvme discover -t tcp -w 192.168.166.5 -a 192.168.166.22
    #nvme discover -t tcp -w 192.168.166.5 -a 192.168.166.23
    #nvme discover -t tcp -w 192.168.167.5 -a 192.168.167.22
    #nvme discover -t tcp -w 192.168.167.5 -a 192.168.167.23
  3. Run the nvme connect-all command across all the supported NVMe/TCP initiator-target LIFs across the nodes, and set the controller loss timeout period for at least 30 minutes or 1800 seconds:

    nvme connect-all -t tcp -w host-traddr -a traddr -l 1800

    Example output:

    #	nvme	connect-all	-t	tcp	-w	192.168.166.5	-a	192.168.166.22	-l	1800
    #	nvme	connect-all	-t	tcp	-w	192.168.166.5	-a	192.168.166.23	-l	1800
    #	nvme	connect-all	-t	tcp	-w	192.168.167.5	-a	192.168.167.22	-l	1800
    #	nvme	connect-all	-t	tcp	-w	192.168.167.5	-a	192.168.167.23	-l	1800

Validate NVMe-oF

You can use the following procedure to validate NVME-oF.

Steps
  1. Verify that the in-kernel NVMe multipath is enabled:

    # cat /sys/module/nvme_core/parameters/multipath
    Y
  2. 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:

    # cat /sys/class/nvme-subsystem/nvme-subsys*/model
    NetApp ONTAP Controller
    NetApp ONTAP Controller
    # cat /sys/class/nvme-subsystem/nvme-subsys*/iopolicy
    round-robin
    round-robin
  3. Verify that the namespaces are created and correctly discovered on the host:

    # nvme list

    Example output:

    Node         SN                   Model
    ---------------------------------------------------------
    /dev/nvme0n1 81CZ5BQuUNfGAAAAAAAB	NetApp ONTAP Controller
    
    
    Namespace Usage    Format             FW             Rev
    -----------------------------------------------------------
    1                 21.47 GB / 21.47 GB	4 KiB + 0 B   FFFFFFFF
  4. Verify that the controller state of each path is live and has the correct ANA status:

    NVMe/FC
    # nvme list-subsys /dev/nvme0n1

    Example output:

    nvme-subsys4 - NQN=nqn.1992-08.com.netapp:sn.8763d311b2ac11ed950ed039ea951c46:subsystem.rhel_207_LB \
    +- nvme1 fc traddr=nn-0x20a6d039ea954d17:pn-0x20a7d039ea954d17,host_traddr=nn-0x200000109b1b95ef:pn-0x100000109b1b95ef live optimized
    +- nvme2 fc traddr=nn-0x20a6d039ea954d17:pn-0x20a8d039ea954d17,host_traddr=nn-0x200000109b1b95f0:pn-0x100000109b1b95f0 live optimized
    +- nvme3 fc traddr=nn-0x20a6d039ea954d17:pn-0x20aad039ea954d17,host_traddr=nn-0x200000109b1b95f0:pn-0x100000109b1b95f0 live non-optimized
    +- nvme5 fc traddr=nn-0x20a6d039ea954d17:pn-0x20a9d039ea954d17,host_traddr=nn-0x200000109b1b95ef:pn-0x100000109b1b95ef live non-optimized
    NVMe/TCP
    # nvme list-subsys /dev/nvme1n1

    Example output:

    nvme-subsys1 - NQN=nqn.1992-08.com.netapp:sn.c680f5bcae1411ed8639d039ea951c46:subsystem.rhel_tcp97 \
    +- nvme1 tcp traddr=192.168.167.23,trsvcid=4420,host_traddr=192.168.167.5 live non-optimized
    +- nvme2 tcp traddr=192.168.167.22,trsvcid=4420,host_traddr=192.168.167.5 live non-optimized
    +- nvme3 tcp traddr=192.168.166.23,trsvcid=4420,host_traddr=192.168.166.5 live optimized
    +- nvme4 tcp traddr=192.168.166.22,trsvcid=4420,host_traddr=192.168.166.5 live optimized
  5. Verify that the NetApp plug-in displays the correct values for each ONTAP namespace device:

    Column
    # nvme netapp ontapdevices -o column

    Example output:

    Device        Vserver   Namespace Path
    ----------------------- ------------------------------
    /dev/nvme0n1 vs_tcp           /vol/vol1/ns1
    
    
    
    NSID       UUID                                   Size
    ------------------------------------------------------------
    1          79c2c569-b7fa-42d5-b870-d9d6d7e5fa84	21.47GB
    JSON
    # nvme netapp ontapdevices -o json

    Example output

    {
    
    "ONTAPdevices" : [
    {
    
    "Device" : "/dev/nvme0n1",
    "Vserver" : "vs_tcp79",
    "Namespace_Path" : "/vol/vol1/ns1",
    "NSID" : 1,
    "UUID" : "79c2c569-b7fa-42d5-b870-d9d6d7e5fa84",
    "Size" : "21.47GB",
    "LBA_Data_Size" : 4096,
    "Namespace_Size" : 5242880
    },
    
    ]
    }

Known issues

There are no known issues.