NVME-ATTACH-NS(1)

πŸ’… nvme-attach-ns β€” like, the NVMe manual, but make it make sense πŸŽ€

okay so bestie, you're looking at nvme-attach-ns from the NVMe Manual β€” and heads up, this one's a legacy queen πŸ‘‘. She's deprecated, but she still shows up to the party for the old scripts. Let's get into it ✨


✨ NAME ✨

nvme-attach-ns β€” send the NVMe attach namespace command and get the result back. (deprecated, bestie, I'm so serious πŸ’€)


πŸ¦‹ SYNOPSIS πŸ¦‹

nvme [<global-options>] attach-ns <device>
                        [--namespace-id=<nsid> | -n <nsid>]
                        [--controllers=<ctrl-list,> | -c <ctrl-list,>]

That's the whole vibe check: you give it a <device>, then pick your namespace with -n / --namespace-id=<nsid> and your controllers with -c / --controllers=<ctrl-list,>. Slay 🫢


🌸 DESCRIPTION 🌸

So here's the tea β˜•: nvme-attach-ns is a deprecated alias for nvme-ns-attach(1). Like, it's the same girl, different name tag. It's been kept around specifically for scripts that were written against nvme-cli versions older than 3.0 β€” we're not gonna break your old code, that's not the energy here πŸ’–

The options and the behavior are identical. Literally the only thing that got kept is the top-level command name. That's it. That's the whole difference 😭

New scripts, though? Bestie, please use nvme ns attach instead. This alias prints a deprecation warning on stderr β€” which, yeah, it's gonna be loud about it πŸ™ˆ β€” and it may be removed in a future release. So don't get too attached (pun intended πŸ’…).

For the full option reference, go read nvme-ns-attach(1). She's got the whole menu ✨


πŸ’œ GLOBAL OPTIONS πŸ’œ

These ones live up at the top-level nvme command, but they're totally available to this subcommand too. Group-chat access, iykyk 🫢

  • --dry-run β€” prints out the command that would be executed, but doesn't actually execute it. A little dress rehearsal, no commitment πŸ’…
  • --no-ioctl-probing β€” turns off probing for 64-bit IOCTL support. Just... no probing today, thanks πŸ™ˆ
  • --no-retries β€” disables the retry logic on transient errors. One shot, no second chances πŸ’€
  • -o <fmt>, --output-format=<fmt> β€” sets the reporting format to normal, tabular, json, or binary. Only one output format at a time, bestie β€” we can't have you being greedy 😌
  • --output-format-version=<version> β€” picks the output format version. Version 1 uses the original field naming, while version 2 (the default) gives you more consistent and script-friendly field names. Any other version gets rejected, periodt 🚫
  • --quiet β€” suppresses informational messages. Errors still get reported (obviously, we're not hiding the important stuff), and --quiet cancels any --verbose for the library log level. It's giving "I said what I said" πŸ’…
  • --set-options=<key=value>[,<key=value>...] β€” sets libnvme library options for this invocation. The supported keys are force-4k, mi-probe-enabled, test-base-dir, and test-sysfs-dir. Mix and match, comma-separated, go off πŸ‘‘
  • --timeout=<ms> β€” sets the timeout for the command in milliseconds. infinite or -1 waits with no time limit at all (0xffffffff). Patience is a virtue, I guess 🌈
  • -v, --verbose β€” bumps up the level of detail in the output. You can specify it multiple times to get even more verbose. The way she just keeps going 😭πŸ”₯
πŸ’‘ Little note, bestie: these options can also be set as machine-wide defaults in nvme-cli.conf(5). But a command-line flag always overrides the file β€” command line is main character energy, fr fr πŸ‘‘

πŸ“ EXAMPLES πŸ“

No Examples

Yeah. Nothing. Not a single one. Iconic, honestly πŸ’€βœ¨


🧚 NVME 🧚

Part of the nvme-user suite πŸ’–


⭐ SEE ALSO ⭐

  • nvme-ns-attach(1) β€” the un-deprecated one, the one you should actually be using, the main character 🫢

⚠️ ok final reminder bestie: this whole page is deprecated. It still works, it still behaves exactly like nvme-ns-attach(1), but it's gonna warn you on stderr every time and it might vanish in a future release. Migrate your scripts and thank me later πŸ’…βœ¨

that's the page, babes β€” brought to you by the NVMe manual, dated 10/30/2026, and no, I did not forget the date, I would never πŸ™ˆπŸ’œ

πŸ“¦ where this page comes from