NAME¶
nvme-config-create - Add an NVMe-oF connection entry to the INI
configuration
SYNOPSIS¶
nvme [<global-options>] config create
[--discovery]
[--persistent ]
[--no-persistent ]
[--epcsd ]
[--no-epcsd ]
[--host-symname=<name>]
[--output=<file>]
[<fabrics-options>]
DESCRIPTION¶
Build one NVMe-oF connection entry from command-line options and
add it to the INI configuration used by nvme connect, nvme
discover, and nvme connect-all. The format is documented at
https://github.com/linux-nvme/nvme-cli/blob/master/libnvme/design/CONFIG.md
If the target file exists, its connections are kept and the new
entry is merged in alongside them. Running the same command again is a
no-op. Unlike nvme config convert, this is not a one-shot migration;
it is the ongoing way to build an INI configuration from the command
line.
The entry is an I/O controller (subsystem) entry by default, and
--nqn is required. Use --discovery for a discovery controller entry instead;
--nqn is then optional.
A connection with an explicit --hostnqn or --hostid is written to
a drop-in under <file>.d/. One without either goes into the
main file.
OPTIONS¶
--discovery
Create a discovery controller entry instead of an I/O
controller entry. Without this, --nqn is required.
--persistent
Keep the discovery controller connected to receive
Asynchronous Event Notifications instead of disconnecting after the discovery
log page fetch. Requires --discovery. Mutually exclusive with
--no-persistent.
--no-persistent
Explicitly record that this discovery controller is not
persistent, overriding any default that would otherwise apply (e.g. one
derived from the discovery log page). Requires --discovery. Mutually exclusive
with --persistent.
--epcsd
Mark this discovery controller as supporting Explicit
Persistent Connection Support for Discovery (EPCSD). Requires --discovery.
Mutually exclusive with --no-epcsd.
--no-epcsd
Explicitly record that this discovery controller does not
support EPCSD, overriding any default that would otherwise apply. Requires
--discovery. Mutually exclusive with --epcsd.
--host-symname=<name>
Name this host persona. Puts it in its own configuration
drop-in.
--output=<file>
Write to this file instead of the default
/etc/nvme/nvme-fabrics.conf.
FABRICS OPTIONS¶
The following options are common to NVMe over Fabrics commands
such as nvme connect:
-a <traddr>, --traddr=<traddr>
Specify the network address of the controller. For
transports using IP addressing (e.g. rdma, tcp), this should be an IP
address.
--concat
Enable secure concatenation (TCP).
-c <#>, --reconnect-delay=<#>
Set the delay in seconds before reconnect is attempted
after a connection loss.
-C <secret>, --kxchap-ctrl-secret=<secret>
Controller authentication secret for bi-directional
authentication. If not specified, bi-directional authentication is not
attempted.
-S <secret>, --kxchap-secret=<secret>
Host authentication secret (KX-HMAC-CHAP). Must be
provided in ASCII format as defined in the NVMe specification.
-C <secret>, --dhchap-ctrl-secret=<secret>
Controller authentication secret for bi-directional
authentication. If not specified, bi-directional authentication is not
attempted. (deprecated, see --kxchap-ctrl-secret)
-S <secret>, --dhchap-secret=<secret>
Host authentication secret (DH-HMAC-CHAP). Must be
provided in ASCII format as defined in the NVMe specification. (deprecated,
see --kxchap-secret)
--disable-sqflow
Disable submission queue flow control.
-G, --data-digest
Enable data digest generation/verification (TCP).
-D, --duplicate-connect
Allow duplicate connections to the same subsystem.
-g, --hdr-digest
Enable header digest generation/verification (TCP).
-f <iface>, --host-iface=<iface>
Specify the network interface to use for the
connection.
-I <hostid>, --hostid=<hostid>
Specify the host UUID.
-q <hostnqn>, --hostnqn=<hostnqn>
Override the default host NQN.
-w <traddr>, --host-traddr=<traddr>
Specify the source address on the host side of the
connection.
-k <#>, --keep-alive-tmo=<#>
Set the keep-alive timeout in seconds.
--keyring=<keyring>
Keyring to use for TLS key lookup.
-n <subnqn>, --nqn=<subnqn>
Specify the NVMe subsystem NQN to connect to.
-i <#>, --nr-io-queues=<#>
Number of I/O queues to create.
-P <#>, --nr-poll-queues=<#>
Number of polling queues to create.
-W <#>, --nr-write-queues=<#>
Number of write queues to create.
-Q <#>, --queue-size=<#>
Queue depth for I/O queues.
-l <#>, --ctrl-loss-tmo=<#>
Maximum time in seconds to retry reconnect attempts after
controller loss.
-s <trsvcid>, --trsvcid=<trsvcid>
Transport service identifier (e.g. TCP/rdma port).
Default is 4420 for RDMA.
-T <#>, --tos=<#>
Type of service value for the connection (TCP).
-t <trtype>, --transport=<trtype>
Specify the transport type. Supported values
include:
+
| Value |
Description |
| rdma |
RDMA (RoCE, iWARP, InfiniBand) |
| tcp |
TCP/IP |
| fc |
Fibre Channel (experimental) |
| loop |
Local loopback transport |
--tls
Enable TLS encryption (TCP).
--tls-key=<tls-key>
TLS key for the connection. It is recommended to preload
keys into the system keyring instead of passing them via the command
line.
--tls-key-identity=<identity>
Identity associated with the TLS key.
GLOBAL OPTIONS¶
The following options are defined at the top-level nvme command
and are available to this subcommand:
--dry-run
Print the command that would be executed, but do not
actually execute it.
--no-ioctl-probing
Disable probing for 64-bit IOCTL support.
--no-retries
Disable retry logic on transient errors.
-o <fmt>, --output-format=<fmt>
Set the reporting format to normal, tabular,
'json, or binary. Only one output format may be used at a
time.
--output-format-version=<version>
Select the output format version. Version 1 uses
the original field naming, while version 2 (default) provides more
consistent and script-friendly field names.
--timeout=<ms>
Set the timeout for the command in milliseconds.
-v, --verbose
Increase the level of detail in the output. May be
specified multiple times to further increase verbosity.
These options can also be set as machine-wide defaults in
nvme-cli.conf(5). A command-line flag always overrides the file.
EXAMPLES¶
•Add a discovery controller entry for an FC
discovery controller:
# nvme config create --transport fc \
--traddr=nn-0x58ccf090c92006da:pn-0x58ccf091492806da \
--host-traddr=nn-0x20000024ff7fa448:pn-0x21000024ff7fa448 \
--hostnqn=nqn.2014-08.org.nvmexpress:uuid:62a4ab74-1e18-11f1-8bb7-6c1ff71ba506 \
--discovery
•Add an I/O controller entry to a test
configuration file:
# nvme config create --transport tcp --traddr=192.168.1.20 --trsvcid=4420 \
--nqn=nqn.2024-01.com.example:data.vol1 \
--output=/tmp/nvme-fabrics.conf
NVME¶
Part of the nvme-user suite