Discovering and Connecting to Targets from Broadcom Hosts

The following procedure describes how to discover and connect to an NVMe/FC target from an Oracle Linux host using a Broadcom Emulex Fibre Channel adapter.

  1. Identify the WWNN and WWPN of the local and remote ports in the /sys/class/scsi_host/host*/nvme_info directory. For example, the following shows a host with one local port and two remote ports:

    cat /sys/class/scsi_host/host*/nvme_info
    
    NVME Initiator Enabled
    XRI Dist lpfc1 Total 6144 IO 5894 ELS 250
    NVME LPORT lpfc1 WWPN x100000109adcbefh WWNN x200000109adcbefh DID x000000 UNKNOWN
    
    NVME Statistics
    LS: Xmt 0000000000 Cmpl 0000000000 Abort 00000000
    LS XMIT: Err 00000000  CMPL: xb 00000000 Err 00000000
    Total FCP Cmpl 0000000000000000 Issue 0000000000000000 OutIO 0000000000000000
            abort 00000000 noxri 00000000 nondlp 00000000 qdepth 00000000 wqerr 00000000 err 00000000
    FCP CMPL: xb 00000000 Err 00000000
    
    NVME Initiator Enabled
    XRI Dist lpfc0 Total 6144 IO 5894 ELS 250
    NVME LPORT lpfc0 WWPN x100000109acfgcad WWNN x200000109acfgcad DID x011700 ONLINE
    NVME RPORT       WWPN x2015c146dc13a14b WWNN x2014c146dc13a14b DID x011307 TARGET DISCSRVC ONLINE
    NVME RPORT       WWPN x2016c146dc13a14b WWNN x2014c146dc13a14b DID x011105 TARGET DISCSRVC ONLINE
    
    NVME Statistics
    LS: Xmt 0000000028 Cmpl 0000000028 Abort 00000000
    LS XMIT: Err 00000000  CMPL: xb 00000000 Err 00000000
    Total FCP Cmpl 00000000000019fa Issue 00000000000019fa OutIO 0000000000000000
            abort 00000005 noxri 00000000 nondlp 00000000 qdepth 00000000 wqerr 00000000 err 00000000
    FCP CMPL: xb 00000005 Err 00000005
  2. Apply the following format change to a combination of the WWPN and WWNN from the local port and one of the remote ports.
    • For all WWPNs, append np-0 to the beginning of the address.
    • For all WWNNs, append nn-0 to the beginning of the address.
    For example,
    LPORT WWNN nn-0x200000109acfgcad WWPN pn-0x100000109acfgcad
    RPORT WWNN nn-0x2014c146dc13a14b WWPN pn-0x2015c146dc13a14b
  3. Run a discovery command to identify NVMe SSD devices available on the remote port. Use the following command format:
    nvme discover --transport fc --traddr <rportwwnn>:<rportwwnp> --host-traddr <lportwwnn>:<lportwwnp>

    In the previous, <rportwwnn> and <rportwwnp> are the remote port world wide namespace name and port, and <rportwwnn> and <rportwwnp> are the local world wide namespace name and port.

    For example, the following command
    # nvme discover --transport fc --traddr nn-0x2014c146dc13a14b:pn-0x2015c146dc13a14b --host-traddr nn-0x200000109acfgcad:pn-0x100000109acfgcad
    
    Discovery Log Number of Records 1, Generation counter 2
    =====Discovery Log Entry 0======
    trtype:  fc
    adrfam:  fibre-channel
    subtype: nvme subsystem
    treq:    not specified
    portid:  0
    trsvcid: none
    subnqn:  nqn.1432-01.com.netapp:sn.c44dd3bsce4245edc1adc021cb11a0f6:test_broadcom
    traddr:  nn-0x2014c146dc13a14b:pn-0x2015c146dc13a14b
  4. Establish a connection to the device represented by the subnqn listed in the discovery response. Use the following command format:
    nvme connect --transport fc --traddr <rportwwnn>:<rportwwnp> --host-traddr <lportwwnn>:<lportwwnp> -n <subnqn> -k <s>
    In the previous,
    • <rportwwnn> and <rportwwnp> are the remote port world wide namespace name and port,
    • <rportwwnn> and <rportwwnp> are the local world wide namespace name and port,
    • <subnqn> is the value of the subnqn parameter generated by the discovery command,
    • <s> is the keep-alive time in seconds for the command to wait for a response from the remote NVMe device before the command generates a timeout message.
    For example, the following command establishes a connection to a remote port with a 5 second timer.
    nvme connect --transport fc --traddr nn-0x2014c146dc13a14b:pn-0x2015c146dc13a14b --host-traddr nn-0x200000109acfgcad:pn-0x100000109acfgcad -n nqn.1432-01.com.netapp:sn.c44dd3bsce4245edc1adc021cb11a0f6:test_broadcom -k 5 
  5. Verify that the storage is now available for the host to use. For example:
    nvme list -v
    Subsystem        Subsystem-NQN                                                                                    Controllers
    ---------------- ------------------------------------------------------------------------------------------------ ----------------
    nvme-subsys1     nqn.1432-01.com.netapp:sn.c44dd3bsce4245edc1adc021cb11a0f6:test_broadcom                             nvme1
    
    Device   SN                   MN                                       FR       TxPort Asdress        Slot   Subsystem    Namespaces
    -------- -------------------- ---------------------------------------- -------- ------ -------------- ------ ------------ ----------------
    nvme1    81EYIJSh2VMMAAAAAAAB NetApp ONTAP Controller                  FFFFFFFF fc     traddr nn-0x2014c146dc13a14b:pn-0x2015c146dc13a14b,host-traddr nn-0x200000109acfgcad:pn-0x100000109acfgcad    nvme-subsys1 nvme1n1
    
    Device       Generic      NSID       Usage                      Format           Controllers
    ------------ ------------ ---------- -------------------------- ---------------- ----------------
    /dev/nvme1n1 /dev/ng1n1   0x1        107.37  GB / 107.37  GB      4 KiB +  0 B   nvme1