English

NVMe/FC Host Configuration for Oracle Linux 7.7 with ONTAP

Contributors netapp-aherbin ciarm Download PDF of this page

Supportability

NVMe/FC is supported on ONTAP 9.6 or later for the following versions of Oracle Linux

  • OL 7.7

    OL 7.7 host can run both NVMe & SCSI traffic through the same fibre channel initiator adapter ports. See the Hardware Universe for a list of supported FC adapters and controllers.

    For the most current list of supported configurations see the NetApp Interoperability Matrix.

Known limitations

  • Native NVMe/FC auto-connect scripts are not available in the nvme-cli package.
    You can use the HBA vendor provided external auto-connect scripts.

  • By default, round-robin load balancing is not enabled.
    You must write a udev rule to enable this functionality. Steps are provided in the section on Enabling NVMe/FC on OL 7.7.

Enabling NVMe on OL 7.7

  1. Ensure the default Oracle Linux 7.7 kernel is installed.

  2. Reboot the host and verify that it boots into specified OL 7.7 kernel.

    # uname -r
    4.14.35-1902.9.2.el7uek
  3. Upgrade to the nvme-cli-1.8.1-3.el7 package.

    # rpm -qa|grep nvme-cli
    nvme-cli-1.8.1-3.el7.x86_64
  4. Add the string below as a separate udev rule at /lib/udev/rules.d/71-nvme-iopolicy-netapp-ONTAP.rules. This enables round-robin load balancing for NVMe multipath.

    # Enable round-robin for NetApp ONTAP
    ACTION==”add”, SUBSYSTEM==”nvme-subsystem”, ATTR{model}==”NetApp ONTAP Controller”, ATTR{iopolicy}=”round-robin
  5. On the OL 7.7 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.

    # cat /etc/nvme/hostnqn
    nqn.2014-08.org.nvmexpress:uuid:75953f3b-77fe-4e03-bf3c-09d5a156fbcd
    *> vserver nvme subsystem host show -vserver vs_nvme_10
    Vserver Subsystem Host NQN
    ------- --------- -------------------------------------- -----------
    ol_157_nvme_ss_10_0
    nqn.2014-08.org.nvmexpress:uuid:75953f3b-77fe-4e03-bf3c-09d5a156fbcd
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 array subsystem to match to host NQN string from /etc/nvme/hostnqn on the host.
  1. Reboot the host.

Configuring the Broadcom FC Adapter for NVMe/FC

  1. Verify that you are using the supported adapter. For the most current list of supported adapters see the NetApp Interoperability Matrix.

    # 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. Copy and install the Broadcom outbox auto-connect scripts package.

    # rpm -ivh nvmefc-connect-12.4.65.0-1.noarch.rpm
  3. Reboot the host.

  4. Verify that you are using the recommended Broadcom lpfc firmware, native inbox driver & outbox auto-connect package versions. For a list of supported versions, see the NetApp Interoperability Matrix.

    # cat /sys/class/scsi_host/host*/fwrev
    12.4.243.17, sil-4.2.c
    12.4.243.17, sil-4.2.c
    
    # cat /sys/module/lpfc/version
    0:12.0.0.10
    
    # rpm -qa | grep nvmefc
    nvmefc-connect-12.4.65.0-1.noarch
  5. Verify that lpfc_enable_fc4_type is set to 3.

    # cat /sys/module/lpfc/parameters/lpfc_enable_fc4_type
    3
  6. Verify that the initiator ports are up and running.

    # cat /sys/class/fc_host/host*/port_name
    0x10000090fae0ec61
    0x10000090fae0ec62
    # cat /sys/class/fc_host/host*/port_state
    Online
    Online
  7. Verify that the NVMe/FC initiator ports are enabled, running and able to see the target LIFs.

    # cat /sys/class/scsi_host/host*/nvme_info
    NVME Initiator Enabled
    XRI Dist lpfc0 Total 6144 NVME 2947 SCSI 2977 ELS 250
    NVME LPORT lpfc0 WWPN x10000090fae0ec61 WWNN x20000090fae0ec61 DID x012000 ONLINE
    NVME RPORT WWPN x202d00a098c80f09 WWNN x202c00a098c80f09 DID x010201 TARGET DISCSRVC ONLINE
    NVME RPORT WWPN x203100a098c80f09 WWNN x202c00a098c80f09 DID x010601 TARGET DISCSRVC ONLINE
    NVME Statistics
    …

Validating NVMe/FC

  1. Verify the following NVMe/FC settings.

    # cat /sys/module/nvme_core/parameters/multipath
    Y
    
    # 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
  2. Verify that the namespaces are created.

    # nvme list
    Node SN Model Namespace Usage Format FW Rev
    ---------------- -------------------- -----------------------
    /dev/nvme0n1 80BADBKnB/JvAAAAAAAC NetApp ONTAP Controller 1 53.69 GB / 53.69 GB 4 KiB + 0 B FFFFFFFF
  3. Verify the status of the ANA paths.

    # nvme list-subsys/dev/nvme0n1
    Nvme-subsysf0 – NQN=nqn.1992-08.com.netapp:sn.341541339b9511e8a9b500a098c80f09:subsystem.ol_157_nvme_ss_10_0
    \
    +- nvme0 fc traddr=nn-0x202c00a098c80f09:pn-0x202d00a098c80f09 host_traddr=nn-0x20000090fae0ec61:pn-0x10000090fae0ec61 live optimized
    +- nvme1 fc traddr=nn-0x207300a098dfdd91:pn-0x207600a098dfdd91 host_traddr=nn-0x200000109b1c1204:pn-0x100000109b1c1204 live inaccessible
    +- nvme2 fc traddr=nn-0x207300a098dfdd91:pn-0x207500a098dfdd91 host_traddr=nn-0x200000109b1c1205:pn-0x100000109b1c1205 live optimized
    +- nvme3 fc traddr=nn-0x207300a098dfdd91:pn-0x207700a098dfdd91 host traddr=nn-0x200000109b1c1205:pn-0x100000109b1c1205 live inaccessible
  4. Verify the NetApp plug-in for ONTAP devices.

    # nvme netapp ontapdevices -o column
    Device   Vserver  Namespace Path             NSID   UUID   Size
    -------  -------- -------------------------  ------ ----- -----
    /dev/nvme0n1   vs_nvme_10       /vol/rhel_141_vol_10_0/ol_157_ns_10_0    1        55baf453-f629-4a18-9364-b6aee3f50dad   53.69GB
    
    # nvme netapp ontapdevices -o json
    {
       "ONTAPdevices" : [
       {
            Device" : "/dev/nvme0n1",
            "Vserver" : "vs_nvme_10",
            "Namespace_Path" : "/vol/rhel_141_vol_10_0/ol_157_ns_10_0",
             "NSID" : 1,
             "UUID" : "55baf453-f629-4a18-9364-b6aee3f50dad",
             "Size" : "53.69GB",
             "LBA_Data_Size" : 4096,
             "Namespace_Size" : 13107200
        }
    ]

Enabling 1MB I/O Size for Broadcom NVMe/FC

The lpfc_sg_seg_cnt parameter must be set to 256 in order for the host to issue 1MB size I/O.

  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

LPFC Verbose Logging

  1. You can set the lpfc_log_verbose driver setting to any of the following values to log NVMe/FC events.

    #define LOG_NVME 0x00100000 /* NVME general events. */
    #define LOG_NVME_DISC 0x00200000 /* NVME Discovery/Connect events. */
    #define LOG_NVME_ABTS 0x00400000 /* NVME ABTS events. */
    #define LOG_NVME_IOERR 0x00800000 /* NVME IO Error events. */
  2. After setting any of these values, run dracut-f and reboot host.

  3. After rebooting, verify the settings.

    # cat /etc/modprobe.d/lpfc.conf
    lpfc_enable_fc4_type=3 lpfc_log_verbose=0xf00083
    
    # cat /sys/module/lpfc/parameters/lpfc_log_verbose
    15728771