Skip to main content
SAN hosts and cloud clients

NVMe-oF Host Configuration for RHEL 8.4 with ONTAP

Contributors netapp-ranuk netapp-aoife

NVMe over Fabrics or NVMe-oF (including NVMe/FC and other transports) is supported with Red Hat Enterprise Linux (RHEL) 8.4 with ANA (Asymmetric Namespace Access). ANA is the asymmetric logical unit access (ALUA) equivalent in the NVMe-oF environment, and is currently implemented with in-kernel NVMe Multipath. You can enable NVMe-oF with in-kernel NVMe Multipath using ANA on RHEL 8.4 and ONTAP as the target.

Features

There are no new features in this release.

Known limitations

  • For RHEL 8.4, in-kernel NVMe multipath is disabled by default. Therefore, you need to enable it manually.

  • NVMe/TCP on RHEL 8.4 remains a Technology Preview feature due to open issues. Refer to the RHEL 8.4 Release Notes for details.

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

Enable in-kernel NVMe multipath

You can use the following procedure to enable in-kernel NVMe multipath.

Steps
  1. Install RHEL 8.4 GA on the server.

  2. After the installation is complete, verify that you are running the specified RHEL 8.4 kernel. See the NetApp Interoperability Matrix for the most current list of supported versions.

    Example:

    # uname -r
    4.18.0-305.el8.x86_64
  3. Install the nvme-cli package:

    Example:

    # rpm -qa|grep nvme-cli
    nvme-cli-1.12-3.el8.x86_64
  4. Enable in-kernel NVMe multipath:

    # grubby --args=nvme_core.multipath=Y --update-kernel /boot/vmlinuz-4.18.0-305.el8.x86_64
  5. On the host, check the host NQN string at /etc/nvme/hostnqn and verify that it matches the host NQN string for the corresponding subsystem on the ONTAP array. Example:

    # cat /etc/nvme/hostnqn
    nqn.2014-08.org.nvmexpress:uuid:9ed5b327-b9fc-4cf5-97b3-1b5d986345d1
    ::> vserver nvme subsystem host show -vserver vs_fcnvme_141
    Vserver     Subsystem       Host NQN
    ----------- --------------- ----------------------------------------------------------
    vs_fcnvme_14 nvme_141_1     nqn.2014-08.org.nvmexpress:uuid:9ed5b327-b9fc-4cf5-97b3-1b5d986345d1
    Note If the host NQN strings do not match, you should use the vserver modify command to update the host NQN string on your corresponding ONTAP NVMe subsystem to match the host NQN string /etc/nvme/hostnqn on the host.
  6. Reboot the host.

    Note

    If you intend to run both NVMe & SCSI co-existent traffic on the same host, it is recommended to use in-kernel NVMe multipath for ONTAP namespaces and dm-multipath for ONTAP LUNs respectively. This means that the ONTAP namespaces should be excluded from dm-multipath to prevent dm-multipath from claiming these namespace devices. This can be done by adding the enable_foreign setting to the /etc/multipath.conf file:

    # cat /etc/multipath.conf
    defaults {
            enable_foreign     NONE
    }

    Restart the multipathd daemon by running a systemctl restart multipathd command to allow the new setting to take effect.

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. See the NetApp Interoperability Matrix Tool for the most current list of supported adapters.

    # cat /sys/class/scsi_host/host*/modelname
    LPe32002-M2
    LPe32002-M2
    # cat /sys/class/scsi_host/host*/modeldesc
    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. See the NetApp Interoperability Matrix Tool for the most current list of supported adapter driver and firmware versions.

    # cat /sys/class/scsi_host/host*/fwrev
    12.8.340.8, sli-4:2:c
    12.8.340.8, sli-4:2:c
    # cat /sys/module/lpfc/version
    0:12.8.0.5
  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 you are able to 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 8.4 GA kernel has the latest fixes which are essential for ONTAP support.

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

    # cat /sys/class/fc_host/host*/symbolic_name
    QLE2742 FW:v9.06.02 DVR:v10.02.00.104-k
    QLE2742 FW:v9.06.02 DVR:v10.02.00.104-k
  2. Verify ql2xnvmeenable is set which enables the Marvell adapter to function as a NVMe/FC initiator using the following command:

    # 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 which means the maximum I/O request size can be up to 1MB. However, 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.

Steps
  1. Set the lpfc_sg_seg_cnt parameter to 256.

    # cat /etc/modprobe.d/lpfc.conf
    options lpfc lpfc_sg_seg_cnt=256
  2. Run a 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
    256
Note This is not applicable to Qlogic NVMe/FC hosts.

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 whether the initiator port can fetch the discovery log page data across the supported NVMe/TCP LIFs:

    # 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
    ...
  2. Verify that other NVMe/TCP initiator-target LIF combos are able to successfully fetch discovery log page data. For example,

    # 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
  3. Run nvme connect-all command across all the supported NVMe/TCP initiator-target LIFs across the nodes. Ensure you set a longer ctrl_loss_tmo timer retry period (for example, 30 minutes, which can be set through -l 1800) during the connect-all so that it would retry for a longer period of time in the event of a path loss. For 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

Validate NVMe-oF

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

Steps
  1. Verify that 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 properly 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 ONTAP namespaces properly reflect on the host. For example,

    Example (a):

    # nvme list
    Node           SN                    Model                   Namespace
    ------------   --------------------- ---------------------------------
    /dev/nvme0n1   81CZ5BQuUNfGAAAAAAAB  NetApp ONTAP Controller   1
    
    Usage                Format         FW Rev
    -------------------  -----------    --------
    85.90 GB / 85.90 GB  4 KiB + 0 B    FFFFFFFF

    Example (b):

    # nvme list
    Node           SN                    Model                   Namespace
    ------------   --------------------- ---------------------------------
    /dev/nvme0n1   81CYrBQuTHQFAAAAAAAC  NetApp ONTAP Controller   1
    
    Usage                Format         FW Rev
    -------------------  -----------    --------
    85.90 GB / 85.90 GB  4 KiB + 0 B    FFFFFFFF
  4. Verify that the controller state of each path is live and has proper ANA status. For example,

    Example (a):

    # nvme list-subsys /dev/nvme1n1
    nvme-subsys1 - NQN=nqn.1992-08.com.netapp:sn.04ba0732530911ea8e8300a098dfdd91:subsystem.nvme_145_1
    \
    +- nvme2 fc traddr=nn-0x208100a098dfdd91:pn-0x208200a098dfdd91 host_traddr=nn-0x200000109b579d5f:pn-0x100000109b579d5f live non-optimized
    +- nvme3 fc traddr=nn-0x208100a098dfdd91:pn-0x208500a098dfdd91 host_traddr=nn-0x200000109b579d5e:pn-0x100000109b579d5e live non-optimized
    +- nvme4 fc traddr=nn-0x208100a098dfdd91:pn-0x208400a098dfdd91 host_traddr=nn-0x200000109b579d5e:pn-0x100000109b579d5e live optimized
    +- nvme6 fc traddr=nn-0x208100a098dfdd91:pn-0x208300a098dfdd91 host_traddr=nn-0x200000109b579d5f:pn-0x100000109b579d5f live optimized

    Example (b):

    #nvme list-subsys /dev/nvme0n1
    nvme-subsys0 - NQN=nqn.1992-08.com.netapp:sn.37ba7d9cbfba11eba35dd039ea165514:subsystem.nvme_114_tcp_1
    \
    +- nvme0 tcp traddr=192.168.2.36 trsvcid=4420 host_traddr=192.168.1.4 live optimized
    +- nvme1 tcp traddr=192.168.1.31 trsvcid=4420 host_traddr=192.168.1.4 live optimized
    +- nvme10 tcp traddr=192.168.2.37 trsvcid=4420 host_traddr=192.168.1.4 live non-optimized
    +- nvme11 tcp traddr=192.168.1.32 trsvcid=4420 host_traddr=192.168.1.4 live non-optimized
    +- nvme20 tcp traddr=192.168.2.36 trsvcid=4420 host_traddr=192.168.2.5 live optimized
    +- nvme21 tcp traddr=192.168.1.31 trsvcid=4420 host_traddr=192.168.2.5 live optimized
    +- nvme30 tcp traddr=192.168.2.37 trsvcid=4420 host_traddr=192.168.2.5 live non-optimized
    +- nvme31 tcp traddr=192.168.1.32 trsvcid=4420 host_traddr=192.168.2.5 live non-optimized
  5. Verify that the NetApp plug-in displays proper values for each ONTAP namespace device. For example,

    Example (a):

    # nvme netapp ontapdevices -o column
    Device       Vserver          Namespace Path
    ---------    -------          --------------------------------------------------
    /dev/nvme1n1 vserver_fcnvme_145 /vol/fcnvme_145_vol_1_0_0/fcnvme_145_ns
    
    NSID  UUID                                   Size
    -------  ------------------------------     --------------------
    1      23766b68-e261-444e-b378-2e84dbe0e5e1  85.90GB
    
    
    # nvme netapp ontapdevices -o json
    {
    "ONTAPdevices" : [
         {
           "Device" : "/dev/nvme1n1",
           "Vserver" : "vserver_fcnvme_145",
           "Namespace_Path" : "/vol/fcnvme_145_vol_1_0_0/fcnvme_145_ns",
           "NSID" : 1,
           "UUID" : "23766b68-e261-444e-b378-2e84dbe0e5e1",
           "Size" : "85.90GB",
           "LBA_Data_Size" : 4096,
           "Namespace_Size" : 20971520
         }
      ]
    }

    Example (b):

    # nvme netapp ontapdevices -o column
    Device       Vserver          Namespace Path
    ---------    -------          --------------------------------------------------
    /dev/nvme0n1 vs_tcp_114       /vol/tcpnvme_114_1_0_1/tcpnvme_114_ns
    
    NSID  UUID                                   Size
    -------  ------------------------------         ---------------
    1      a6aee036-e12f-4b07-8e79-4d38a9165686  85.90GB
    
    
    # nvme netapp ontapdevices -o json
    {
         "ONTAPdevices" : [
         {
              "Device" : "/dev/nvme0n1",
               "Vserver" : "vs_tcp_114",
              "Namespace_Path" : "/vol/tcpnvme_114_1_0_1/tcpnvme_114_ns",
              "NSID" : 1,
              "UUID" : "a6aee036-e12f-4b07-8e79-4d38a9165686",
              "Size" : "85.90GB",
              "LBA_Data_Size" : 4096,
              "Namespace_Size" : 20971520
           }
      ]
    
    }

Known issues

There are no known issues.