NVME-CONNECT(1)
π NVME-CONNECT(1) β the nvme-connect glow-up (from the NVMe Manual, bestie)
okay so. nvme-connect is literally the moment your machine makes a Fabrics controller and connects it to a remote system. She's the main character of "my storage is somewhere else and I want in." π¦
β¨ NAME β¨
nvme-connect β connect to a Fabrics controller. periodt.
π SYNOPSIS π
nvme [<global-options>] connect [--config=<filename>]
[--devid-file=<filename>]
[--discovery]
[--idempotent]
[--owner=<NAME>]
[<fabrics-options>]
π DESCRIPTION π
So what she actually does: she creates a transport connection to a remote system (and yes, that system is specified by --traddr and --trsvcid, keep up π
), and then she creates an NVMe over Fabrics controller for the NVMe subsystem that you named with the --nqn option.
That's it. That's the whole vibe. Connect + controller = iconic π«
πΈ OPTIONS πΈ
--config=<filename>β bestie, use this JSON configuration file instead of the default one. simple as that β¨--devid-file=<filename>β write the kernel-assigned device name (like, for example,nvme0) into<filename>. If the controller is already connected, the device name that already exists gets written. Otherwise the device name goes in after the controller is connected. π«Ά
When you use it with --idempotent, the existing device name gets written before the command exits successfully. this is so a supervising process β a systemd service, say β can figure out which device to disconnect later. iykyk.
the output file is created before the connection is even attempted. and no cap: if the file can't be created, like because the parent directory doesn't exist, the command fails without attempting the connection at all. π
--discoveryβ plot twist: the target is a Discovery Controller. The kernel recognizes the well-known discovery NQN all by itself, but without this option it sees a Discovery Controller with a unique NQN as an I/O controller. and that gives it a keep-alive timeout of5seconds when none is given, and creates I/O queues for it. so yeah, use the flag if that's not what you want π--idempotentβ if the controller you're asking for is already connected, exit with status0instead of reporting an error. she's unbothered, she's thriving π--owner=<NAME>β recordNAMEas the owner of the connected controller in the NVMe ownership registry, so other orchestrators (andnvme-disconnect-all) leave it alone. seenvme-disconnect-all(1). an emptyNAME(--owner=) removes the registry entry instead, leaving the controller unowned. and without--owner, a controller that was already connected keeps whatever entry it has. no take-backsies π
π¦ FABRICS OPTIONS π¦
these are the options that all the NVMe over Fabrics commands share, nvme connect included. girlies, this is the good stuff:
-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 you don't specify it, bi-directional authentication isn't attempted. that's just how it is β¨-S <secret>,--kxchap-secret=<secret>β host authentication secret (KX-HMAC-CHAP). must be provided in ASCII format as defined in the NVMe specification. rules are rules π-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) β she's an elder, show her respect but use the new 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, legacy queen π--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 you CAN have two, she's not jealous π-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. glow-up your identity β¨-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. this is literally the who-you're-connecting-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. she's persistent, she's loyal π«Ά-s <trsvcid>,--trsvcid=<trsvcid>β transport service identifier (e.g. TCP/rdma port). the 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. (pls don't put secrets in your shell history bestie, that's so not the move π)--tls-key-identity=<identity>β identity associated with the TLS key.
π GLOBAL OPTIONS π
these are defined up at the top-level nvme command and they're available to this subcommand too. big main-character energy β¨
--dry-runβ print the command that would be executed, but do not actually execute it. all the fantasy, zero consequences π--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 one, queen, you can't have all four π--output-format-version=<version>β select the output format version. version1uses the original field naming, while version2(the default) provides more consistent and script-friendly field names. other versions are rejected. respectfully, no π--quietβ suppress informational messages. errors are still reported, and--quietcancels any--verbosefor the library log level. she's a literal "mute notifications" button π--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). she'll wait forever, literally π-v,--verboseβ increase the level of detail in the output. may be specified multiple times to further increase verbosity. spam the-v, she loves to over-explain π¬
these options can also be set as machine-wide defaults in nvme-cli.conf(5). a command-line flag always overrides the file. flag > file, every single time. π
π EXAMPLES π
- connect to a subsystem named
nqn.2014-08.com.example:nvme:nvm-subsystem-sn-d78432on the IP4 address192.168.1.3. port4420is used by default:
# nvme connect --transport=rdma --traddr=192.168.1.3 \
--nqn=nqn.2014-08.com.example:nvme:nvm-subsystem-sn-d78432
look at her go. effortless. π¦β¨
β SEE ALSO β
nvme-discover(1) nvme-connect-all(1) β go read those next, bestie, they're the sequel π
π AUTHORS π
this was co-written by Jay Freyensee[1] and Christoph Hellwig[2]. two icons, one manpage π
π NVME π
part of the nvme-user suite π«Ά
π NOTES π
- Jay Freyensee β
mailto:james.p.freyensee@intel.com - Christoph Hellwig β
mailto:hch@lst.de
okay that's the whole thing, you're officially educated π
β¨ this was the NVMe manual, dated 10/30/2026 β go forth and connect responsibly, bestie πΈππ
π¦ 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