Requirements
To using Linux NVMe over Fabrics client, need Linux with kernel 4.08 and above.
Install the nvme-cli package on the client machine:
#yum install nvme-cli
or on Debian:
#apt-get install nvme-cli
Startup Kernel Module
#modprobe nvme-rdma
Discover NVMe-oF subsystems
nvme discover -t rdma -a 192.168.80.111 -s 4420
Discovery Log Number of Records 1, Generation counter 1
=====Discovery Log Entry 0======
trtype: rdma
adrfam: ipv4
subtype: nvme subsystem
treq: not specified
portid: 1
trsvcid: 4420
subnqn:nqn.2016-12.com.nvmstack:test-volume0
traddr: 192.168.80.111
rdma_prtype: not specified
rdma_qptype: connected
rdma_cms: rdma-cm
rdma_pkey: 0x0000
Connect to NVMe-oF subsystems
nvme connect -t rdma -n nqn.2016-12.com.nvmstack:test-volume0 -a 192.168.80.111 -s 4420
List nvme device info:
#nvme list
Node SN Model Namespace Usage Format FW Rev
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1 NVMStack Controller 160.11 GB / 160.11 GB 512 B + 0 B A348BB834CD3544
Disconnect NVMe-oF subsystems
In order to disconnect from the target run the nvme disconnect command:
#nvme disconnect -d /dev/nvme0n1