Este conteúdo não está disponível no idioma selecionado.
Chapter 12. Configuring NVMe over fabrics using NVMe/TCP
In a Non-volatile Memory Express™ (NVMe™) over TCP (NVMe/TCP) setup, the host mode is fully supported and the controller setup is not supported.
Red Hat does not support the NVMe Target (nvmet) functionality. Consult your storage manufacturer’s documentation for instructions about how to configure your NVMe over Fabrics block storage target device.
In RHEL 9, the native NVMe multipathing is enabled by default. Enabling DM multipathing is not supported with NVMe/TCP.
12.1. Configuring an NVMe/TCP host Copiar o linkLink copiado para a área de transferência!
You can configure a Non-volatile Memory Express™ (NVMe™) over TCP (NVMe/TCP) host by using the NVMe management command-line interface (nvme-cli) tool.
Procedure
Install the
nvme-clitool:dnf install nvme-cli
# dnf install nvme-cliCopy to Clipboard Copied! Toggle word wrap Toggle overflow This tool creates the
hostnqnfile in the/etc/nvme/directory, which identifies the NVMe host.Find the nvme
hostidandhostnqn:cat /etc/nvme/hostnqn nqn.2014-08.org.nvmexpress:uuid:8ae2b12c-3d28-4458-83e3-658e571ed4b8 cat /etc/nvme/hostid 09e2ce17-ccc9-412d-8dcf-2b0a1d581ee3
# cat /etc/nvme/hostnqn nqn.2014-08.org.nvmexpress:uuid:8ae2b12c-3d28-4458-83e3-658e571ed4b8 # cat /etc/nvme/hostid 09e2ce17-ccc9-412d-8dcf-2b0a1d581ee3Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use the
hostidandhostnqnvalues to configure the NVMe/TCP controller.Check the status of the controller:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the host network for a newly installed Ethernet controller with a static IP address:
nmcli connection add con-name ens6 ifname ens6 type ethernet ip4 192.168.101.154/24 gw4 192.168.101.1
# nmcli connection add con-name ens6 ifname ens6 type ethernet ip4 192.168.101.154/24 gw4 192.168.101.1Copy to Clipboard Copied! Toggle word wrap Toggle overflow Here, replace 192.168.101.154 with the host IP address.
nmcli connection mod ens6 ipv4.method manual nmcli connection up ens6
# nmcli connection mod ens6 ipv4.method manual # nmcli connection up ens6Copy to Clipboard Copied! Toggle word wrap Toggle overflow Since a new network is created to connect the NVMe/TCP host to the NVMe/TCP controller, execute this step on the controller too.
Verification
Verify if the newly created host network works correctly:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
12.2. Connecting the NVMe/TCP host to the NVMe/TCP controller Copiar o linkLink copiado para a área de transferência!
Connect the NVMe™ over TCP (NVMe/TCP) host to the NVMe/TCP controller system to verify that the NVMe/TCP host can now access the namespace.
The NVMe/TCP controller (nvmet-tcp) module is not supported.
Prerequisites
- You have configured an NVMe/TCP host. For more information, see Configuring an NVMe/TCP host.
- You have configured an NVMe/TCP controller using external storage software and the network is configured on the controller. In this procedure, 192.168.101.55 is the IP address of NVMe/TCP controller.
Procedure
Load the
nvme-tcpmodule if not already:modprobe nvme-tcp
# modprobe nvme-tcpCopy to Clipboard Copied! Toggle word wrap Toggle overflow Discover the available subsystems on the NVMe controller:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Here, 192.168.101.55 is the NVMe/TCP controller IP address and 192.168.101.154 is the NVMe/TCP host IP address.
Configure the
/etc/nvme/discovery.conffile to add the parameters used in thenvme discovercommand :echo "--transport=tcp --traddr=192.168.101.55 --host-traddr=192.168.101.154 --trsvcid=8009" >> /etc/nvme/discovery.conf
# echo "--transport=tcp --traddr=192.168.101.55 --host-traddr=192.168.101.154 --trsvcid=8009" >> /etc/nvme/discovery.confCopy to Clipboard Copied! Toggle word wrap Toggle overflow Connect the NVMe/TCP host to the controller system:
nvme connect-all
# nvme connect-allCopy to Clipboard Copied! Toggle word wrap Toggle overflow Make the NVMe/TCP connection persistent:
systemctl enable nvmf-autoconnect.service
# systemctl enable nvmf-autoconnect.serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that the NVMe/TCP host can access the namespace:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
12.3. Configuring NVMe host authentication Copiar o linkLink copiado para a área de transferência!
To establish an authenticated connection with an NVMe over Fabrics (NVMe-oF) controller, you can configure authentication on a Non-volatile Memory Express (NVMe) host. NVMe authentication uses a shared secret or a pair of secrets, with a challenge-response protocol, for example, NVMe DH-HMAC-CHAP.
NVMe authentication is supported only for the NVMe/TCP transport type. This feature is not available for other transports, such as NVMe over Remote Direct Memory Access (NVMe/RDMA) or NVMe over Fibre Channel (NVMe/FC).
Prerequisites
-
The
nvme-clipackage is installed. -
You know the Host NVMe Qualified Name (Host NQN) and the Subsystem NVMe Qualified Name (Subsystem NQN), if using bi-directional authentication. To see the default Host NQN for your system, run
nvme show-hostnqnq.
Procedure
Generate an authentication secret:
For the host:
hostkey=$(nvme gen-dhchap-key -n ${HOSTNQN})# hostkey=$(nvme gen-dhchap-key -n ${HOSTNQN})Copy to Clipboard Copied! Toggle word wrap Toggle overflow For the subsystem:
ctrlkey= $(nvme gen-dhchap-key -n ${SUBSYSTEM})# ctrlkey= $(nvme gen-dhchap-key -n ${SUBSYSTEM})Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Configure the host for authentication:
nvme connect -t tcp -n ${SUBSYSTEM} -a ${TRADDR} -s 4420 --dhchap-secret=${hostkey} --dhchap-ctrl-secret=${ctrlkey}# nvme connect -t tcp -n ${SUBSYSTEM} -a ${TRADDR} -s 4420 --dhchap-secret=${hostkey} --dhchap-ctrl-secret=${ctrlkey}Copy to Clipboard Copied! Toggle word wrap Toggle overflow This provides the authentication secrets to the
nvme-connectutility so that it can authenticate and establish a connection to the target.-
Optional: To enable automated logins, set up persistent NVMe fabrics configuration. To do so, add the
--dhchap-secretand--dhchap-ctrl-secretparameters to/etc/nvme/discovery.confor/etc/nvme/config.json.
-
Optional: To enable automated logins, set up persistent NVMe fabrics configuration. To do so, add the
Verification
Verify that the NVMe storage is attached:
nvme list
# nvme listCopy to Clipboard Copied! Toggle word wrap Toggle overflow This displays the list of NVMe devices currently attached to the host. Verify that the expected storage is listed, indicating the connection to the storage server is successful.