Discovering and Connecting to Targets from Qlogic Hosts
The following procedure describes how to discover and connect to an NVMe/FC target from an Oracle Linux host using a Marvell Qlogic Fibre Channel adapter.
-
Ensure that the qla2xxx Qlogic module is installed and loaded.
modprobe -r qla2xxx modprobe qla2xxx
-
Identify the WWNN and WWPN of the local and remote ports. Use the following command:
sudo dmesg | grep traddr
For example, the following shows a host with one local port and one remote ports:sudo dmesg | grep traddr [ 6.139862] qla2xxx [0000:04:00.0]-ffff:0: register_localport: host-traddr=nn-0x200000109acfgcad:pn-0x100000109acfgcad on portID:10700 [ 6.241762] qla2xxx [0000:04:00.0]-2102:0: qla_nvme_register_remote: traddr=nn-0x2014c146dc13a14b:pn-0x2015c146dc13a14b PortID:01050d
- 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_qlogic traddr: nn-0x2014c146dc13a14b:pn-0x2015c146dc13a14b
- 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 nn-0x2014c146dc13a14b:pn-0x2015c146dc13a14b:test_qlogic -k 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_qlogic 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