Discovery-Client Command
The NVMe-over-Fabrics specification defines the concept of a discovery controller that an NVMe host can query on a fabric network to discover NVMe subsystems. These subsystems are contained in NVMe targets that can be connected from the network.
Note that the base NVMe specification defines the NQN (NVMe Qualified Name) format, which an NVMe endpoint (device, subsystem, etc) must follow to guarantee a unique name under the NVMe standard. In particular, the host NQN uniquely identifies the NVMe host, and can be used by the discovery controller to control what NVMe target resources are allocated to the NVMe host for a connection.
Install the discovery-client rpm
yum install -y discovery-client
Start the discovery-client service
systemctl start discovery-client.service
Get the hostnqn
cat /etc/nvme/hostnqn
In case there is no hostnqn, you can generate one by using the following command:
nvme gen-hostnqn > /etc/nvme/hostnqn
The simplified syntax of this command is:
discovery-client connect-all -t tcp -a <ip> -s 8009 -q <hostnqn> -p
These are only a small sample of the possible parameters. See the discovery-client help menu for a complete list and usage of the discovery-client command. We have chosen these parameters as an example of the minimum required to connect to and use an NVMe/TCP volume.
After the application client connects to the Lightbits storage cluster, the volumes that this application client can access appear as local block devices. The following example shows how to use the Linux nvme
command to list all block devices after the connect
command finishes.
Sample Command
$ nvme list
Sample Output
Node SN Model Namespace Usage Format FW Rev
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme11n1 f2e1b3930c2ed3 LightBox 1 4.29 GB / 4.29 GB 4 KiB + 0 B 1.0
/dev/nvme11n2 f2e1b3930c2ed3 LightBox 3 4.29 GB / 4.29 GB 4 KiB + 0 B 1.0
/dev/nvme11n3 f2e1b3930c2ed3 LightBox 4 12.88 GB / 12.88 GB 4 KiB + 0 B 1.0
/dev/nvme11n4 f2e1b3930c2ed3 LightBox 5 12.88 GB / 12.88 GB 4 KiB + 0 B 1.0
In this example, the Lightbits storage server serves four volumes via NVMe/TCP. These volumes are mapped to the /dev Linux file system path. The NVMe/TCP block device names are listed in the Node column.