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 the nvme connect-all command and dumps it into a raw binary file. By default, nvme connect-all dumps 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 format nvme*, 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.json file β€” or none to not read in an existing configuration file at all. The JSON configuration file format is documented over at https://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=force for the long form, -pforce for 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 --persistent is 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> β€” record NAME as the owner of connected controllers in the NVMe ownership registry, so other orchestrators (and nvme-disconnect-all) leave them alone. See nvme-disconnect-all(1). When --nbft is also given, --owner takes precedence over its default owner of nbft. An empty NAME (--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 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:
    • 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. (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 to normal, tabular, 'json, or binary. Only one output format may be used at a time. Pick a lane bestie πŸ’…
  • --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. They fight, and quiet wins.
  • --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). 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 name host1-rogue-nqn over the RDMA network. Port 4420 is 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.conf file. 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