nvme-disconnect1
Disconnect one or more fabrics controller(s).
Usage
nvme [<global-options>]
disconnect
[{--device=<device> | -d
<device>}]
[{--exclude | -x}]
[<fabrics-options>]
Overview
Disconnects and removes one or more existing NVMe over Fabrics controllers. If the --device option is specified, the controller with that name will be removed. If --nqn is given by itself, every controller connected to the subsystem identified by subnqn will be removed. If --nqn is combined with any of the other fabrics options below (the same ones nvme connect accepts, such as --transport, --traddr, --trsvcid, --host-traddr, --host-iface, --hostnqn or --hostid), only the controller(s) matching all of the specified options are removed — useful for disambiguating between multiple controllers connected to the same subsystem. --device cannot be combined with --nqn or any of the other fabrics options.
With --exclude, a matching entry is written to the system-wide NVMe-oF exclusion list before the controller (or subsystem) is torn down, so that a cooperating orchestrator sees the exclusion in place before the removal event fires and does not immediately reconnect. See nvme-exclusion-add(1) and the exclusion list overview for details.
Options
-
-d <device>, --device <device> -
Indicates that the controller with the specified name should be removed. Cannot be combined with --nqn or any of the fabrics options below.
-
-x, --exclude -
Write a matching entry to the user exclusion list before disconnecting, so orchestrators do not auto-reconnect the controller. The entry is built from the controller’s transport parameters (or, with a bare --nqn, from the subsystem NQN).
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.
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. Other versions are rejected.
-
--quiet -
Suppress informational messages. Errors are still reported, and --quiet cancels any --verbose for the library log level.
-
--set-options=<key=value>[,<key=value>...] -
Set libnvme library options for this invocation. Supported keys are force-4k, mi-probe-enabled, test-base-dir and test-sysfs-dir.
-
--timeout=<ms> -
Set the timeout for the command in milliseconds. infinite or -1 waits without a time limit (0xffffffff).
-
-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
• Disconnect all controllers for a subsystem named nqn.2014-08.com.example:nvme:nvm-subsystem-sn-d78432:
# nvme disconnect --nqn=nqn.2014-08.com.example:nvme:nvm-subsystem-sn-d78432
• Disconnect the controller nvme4
# nvme disconnect --device=nvme4
• Disconnect only the tcp controller for a subsystem at a given traddr, leaving other controllers of the same subsystem (e.g. over a different transport address) connected:
# nvme disconnect --nqn=nqn.2014-08.com.example:nvme:nvm-subsystem-sn-d78432 \
--transport=tcp --traddr=192.168.1.100
• Disconnect nvme4 and exclude it so orchestrators do not reconnect it:
# nvme disconnect --device=nvme4 --exclude
Nvme
Part of the nvme-user suite
Releases
5 releases since Debian 10 (Buster); the text changed 4 times.
--concat since Arch Linux 2026-11-01;
--ctrl-loss-tmo since Arch Linux 2026-11-01;
--data-digest since Arch Linux 2026-11-01;
--dhchap-ctrl-secret since Arch Linux 2026-11-01;
--dhchap-secret since Arch Linux 2026-11-01;
--disable-sqflow since Arch Linux 2026-11-01;
--dry-run since Arch Linux 2026-11-01;
--duplicate-connect since Arch Linux 2026-11-01;
--exclude since Arch Linux 2026-11-01;
--hdr-digest since Arch Linux 2026-11-01;
--host-iface since Arch Linux 2026-11-01;
--host-traddr since Arch Linux 2026-11-01;
--hostid since Arch Linux 2026-11-01;
--hostnqn since Arch Linux 2026-11-01;
--keep-alive-tmo since Arch Linux 2026-11-01;
--keyring since Arch Linux 2026-11-01;
--kxchap-ctrl-secret since Arch Linux 2026-11-01;
--kxchap-secret since Arch Linux 2026-11-01;
--no-ioctl-probing since Arch Linux 2026-11-01;
--no-retries since Arch Linux 2026-11-01;
--nr-io-queues since Arch Linux 2026-11-01;
--nr-poll-queues since Arch Linux 2026-11-01;
--nr-write-queues since Arch Linux 2026-11-01;
--output-format since Debian 13 (Trixie);
--output-format-version since Arch Linux 2026-11-01;
--queue-size since Arch Linux 2026-11-01;
--quiet since Arch Linux 2026-11-01;
--reconnect-delay since Arch Linux 2026-11-01;
--set-options since Arch Linux 2026-11-01;
--timeout since Arch Linux 2026-11-01;
--tls since Arch Linux 2026-11-01;
--tls-key since Arch Linux 2026-11-01;
--tls-key-identity since Arch Linux 2026-11-01;
--tos since Arch Linux 2026-11-01;
--traddr since Arch Linux 2026-11-01;
--transport since Arch Linux 2026-11-01;
--trsvcid since Arch Linux 2026-11-01;
--verbose since Debian 13 (Trixie);
-C since Arch Linux 2026-11-01;
-D since Arch Linux 2026-11-01;
-G since Arch Linux 2026-11-01;
-I since Arch Linux 2026-11-01;
-P since Arch Linux 2026-11-01;
-Q since Arch Linux 2026-11-01;
-S since Arch Linux 2026-11-01;
-T since Arch Linux 2026-11-01;
-W since Arch Linux 2026-11-01;
-a since Arch Linux 2026-11-01;
-c since Arch Linux 2026-11-01;
-f since Arch Linux 2026-11-01;
-g since Arch Linux 2026-11-01;
-i since Arch Linux 2026-11-01;
-k since Arch Linux 2026-11-01;
-l since Arch Linux 2026-11-01;
-o since Debian 13 (Trixie);
-q since Arch Linux 2026-11-01;
-s since Arch Linux 2026-11-01;
-t since Arch Linux 2026-11-01;
-v since Debian 13 (Trixie);
-w since Arch Linux 2026-11-01;
-x since Arch Linux 2026-11-01.