NVME-CONNECT-ALL(1)
β¨ NVME-CONNECT-ALL(1) β¨
okay bestie, this is the nvme-connect-all page from the NVMe Manual β yes the whole manual, and it's a lot but we're gonna get through it together π
π NAME π
nvme-connect-all β it discovers Fabrics controllers and then connects to them. That's the whole vibe. Discover + connect, slay.
π¦ SYNOPSIS π¦
nvme [<global-options>] connect-all
[--raw=<filename> | -r <filename>]
[--device=<device> | -d <device>]
[--config=<filename> | -J <cfg>]
[--persistent[=<no|auto|force>] | -p]
[--quiet]
[--no-reuse]
[--nbft]
[--no-nbft]
[--nbft-path=<STR>]
[--owner=<NAME>]
[<fabrics-options>]
[<global-options>]
π DESCRIPTION π
So here's the tea π β this command sends one or more Discovery requests to an NVMe over Fabrics Discovery Controller, and then it literally creates controllers for all the discovery records that come back. It's giving main character energy: it goes out, finds everybody, and brings them home.
Now, if you give it no parameters at all, nvme connect-all will go looking for a /usr/local/etc/nvme/discovery.conf file to use β that file supplies a list of connect-all commands to run. But if that /usr/local/etc/nvme/discovery.conf file doesn't exist? Yeah, the command just quits with an error. π No config, no vibes.
Otherwise, you should specify a specific Discovery Controller using the --transport, --traddr and, if you need it, the --trsvcid β and then a Discovery request gets sent to that specified Discovery Controller. Simple as that.
fr fr, go read the docs for the nvme-discover(1) command if you want more background on all this. It's the lore.
πΈ OPTIONS πΈ
-r <filename>,--raw=<filename>β this field takes the output of thenvme connect-allcommand and dumps it into a raw binary file. By default,nvme connect-alldumps the output to stdout instead. So like, file if you want it, terminal if you don't β¨-d <device>,--device=<device>β this field takes a device as input. It must be a persistent device associated with a Discovery Controller that was previously created by the command"connect-all"or"discover". The<device>follows the formatnvme*, eg.nvme0,nvme1. Don't just make one up bestie, it has to already exist π-J <filename>,--config=<filename>β use the specified JSON configuration file instead of the default/usr/local/etc/nvme/config.jsonfile β ornoneto not read in an existing configuration file at all. The JSON configuration file format is documented over athttps://github.com/linux-nvme/nvme-cli/blob/master/libnvme/doc/config-schema.jsonπ«Ά-p,--persistent[=<no|auto|force>]β keep the discovery controller connected after retrieving the discovery log page, instead of disconnecting once it's done. Iconic, honestly.
β οΈ okay this part is important: because the value is optional, it must be attached directly to the option:--persistent=forcefor the long form,-pforcefor the short form. A value given as a separate argument (--persistent force,-p force) is no value of the option but an extra argument, and the command fails. So don't do that π
no: never persist. Use this to opt out of the default.auto(the default β both when the option is omitted entirely and when--persistentis given with no value): persist a Discovery Log Page entry's connection only where that entry's own EPCSD (Explicit Persistent Connection Support for Discovery) flag reports support for it; degrade to non-persistent, with a log message, for entries that don't. So it's like, respecting boundaries πforce: persist regardless of what EPCSD reports β for a target whose self-reported EPCSD cannot be trusted. Bold. Slightly unhinged. We love her.
auto and force ask each discovery controller for a keep-alive timeout of 30 seconds, or the --keep-alive-tmo value when it is given. no asks for none β even when --keep-alive-tmo is given. Periodt.
--quietβ suppress error messages. Shhh π€«--no-reuseβ always create a new connection, never reuse an existing one. Fresh start energy β¨--nbftβ only look at NBFT tables.--no-nbftβ do not look at NBFT tables.--nbft-path=<STR>β use a user-defined path to the NBFT tables. Your tables, your rules π--owner=<NAME>β recordNAMEas the owner of connected controllers in the NVMe ownership registry, so other orchestrators (andnvme-disconnect-all) leave them alone. Seenvme-disconnect-all(1). When--nbftis also given,--ownertakes precedence over its default owner ofnbft. An emptyNAME(--owner=) removes the registry entries instead, leaving the controllers unowned. Without--owner, a controller that was already connected keeps the entry it has. Basically: claim your stuff so nobody else touches it π
π§ FABRICS OPTIONS π§
The following options are common to NVMe over Fabrics commands such as nvme connect. So like, they show up everywhere in fabrics land π
-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 a reconnect is attempted after a connection loss.-C <secret>,--kxchap-ctrl-secret=<secret>β controller authentication secret for bi-directional authentication. If it's 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. Don't freestyle the format π₯-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) β yeah this one's old news, use the kxchap one π-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) β same deal, deprecated, move on π«Ά--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. Yes, duplicates. It said what it said.-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 is4420for RDMA. π-T <#>,--tos=<#>β type of service value for the connection (TCP).-t <trtype>,--transport=<trtype>β specify the transport type. Supported values include:rdmaβ RDMA (RoCE, iWARP, InfiniBand)tcpβ TCP/IPfcβ 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. (passing secrets on the command line is giving "I left my diary open on the kitchen table" energy, don't π)--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. These are the machine-wide defaults vibe, but per-command π
--dry-runβ print the command that would be executed, but do not actually execute it. Manifesting without committing β¨--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 tonormal,tabular,'json, orbinary. Only one output format may be used at a time. Pick a lane bestie π--output-format-version=<version>β select the output format version. Version1uses the original field naming, while version2(default) provides more consistent and script-friendly field names. Other versions are rejected. π«--quietβ suppress informational messages. Errors are still reported, and--quietcancels any--verbosefor the library log level. They fight, and quiet wins.--set-options=<key=value>[,<key=value>...]β set libnvme library options for this invocation. Supported keys areforce-4k,mi-probe-enabled,test-base-dirandtest-sysfs-dir.--timeout=<ms>β set the timeout for the command in milliseconds.infiniteor-1waits without a time limit (0xffffffff). No cap, no timer, just vibes π-v,--verboseβ increase the level of detail in the output. May be specified multiple times to further increase verbosity. Spam it, honestly π
These options can also be set as machine-wide defaults in nvme-cli.conf(5). A command-line flag always overrides the file. Always. No exceptions. π
β¨ EXAMPLES β¨
Okay bestie, this is the part where it gets real. Actual commands, actual vibes π
- Connect to literally everything the Discovery Controller hands back. So you've got a Discover Controller chillin' at IP4 address
192.168.1.3, and you want all the resources allocated for NVMe Host namehost1-rogue-nqnover the RDMA network. Port4420is used by default, no cap:
# nvme connect-all --transport=rdma --traddr=192.168.1.3 \
--hostnqn=host1-rogue-nqn
- Use the default system-defined NBFT tables. Just let the system do its thing π«Ά:
# nvme connect-all --nbft
- Roll your own NBFT table path. If you're the type who needs a user-defined path for the NBFT table (main character energy, honestly):
# nvme connet-all --nbft-path=/sys/firmware/acpi/tables/NBFT1
π«Ά Heads up bestie β that connet-all up there is exactly how the original page spells it. Copying it verbatim, typos and all, because I am not out here inventing commands for you.
- Use a
/usr/local/etc/nvme/discovery.conffile. Big "I wrote my own config" energy β¨ Here's what that file looks like:
# Machine default 'nvme discover' commands. Query the
# Discovery Controller's two ports (some resources may only
# be accessible on a single port). Note an official
# nqn (Host) name defined in the NVMe specification is being used
# in this example.
-t rdma -a 192.168.69.33 -s 4420 -q nqn.2014-08.com.example:nvme:nvm-subsystem-sn-d78432
-t rdma -a 192.168.1.4 -s 4420 -q nqn.2014-08.com.example:nvme:nvm-subsystem-sn-d78432
At the prompt type "nvme connect-all".
Like, read that last line again: At the prompt type "nvme connect-all". That's it. That's the whole move. You set up the file, you drop into the prompt, you type it, and you ate. π₯ Note that the example is querying two ports on the Discovery Controller, because some resources may only be accessible on a single port β so you gotta hit both, iykyk. And yes, an official nqn (Host) name defined in the NVMe specification is being used in this example. Iconic behavior only. π
π SEE ALSO π
Go read your sisters, bestie, they're both baddies:
π NVME π
Part of the nvme-user suite. Periodt. π
And that's a wrap on this whole gorgeous page, babes π It's from the NVMe source, version/date 10/30/2026 β so go forth, connect all the things, and remember: the vibe check is the flags, and the flags are correct. Slay! π
β¨π¦
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms