NVME-DIR-SEND(1)

πŸ’… NVME-DIR-SEND(1) β€” the nvme-dir-send page, but make it make sense

okay bestie, this is a page from the NVMe Manual, and no cap, it's actually kinda niche but lowkey iconic once you get it. Sit down, grab a strawberry πŸ“, we're doing directives.


✨ NAME ✨

nvme-dir-send β€” issue a directive send command, and it returns the applicable results. that's the whole vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

nvme [<global-options>] dir send <device>
                        [--namespace-id=<nsid> | -n <nsid>]
                        [--data-len=<data-len> | -l <data-len>]
                        [--dir-type=<dtype> | -D <dtype>]
                        [--dir-spec=<dspec> | -S <dspec>]
                        [--dir-oper=<doper> | -O <doper>]
                        [--endir=<endir> | -e <endir>]
                        [--target-dir=<tdir> | -T <tdir>] [--raw-binary | -b]

like, yes, it's a lot of flags, but we'll get through them together, i promise 🫢


🌸 DESCRIPTION 🌸

so what this does is, it submits an NVMe Directive Send admin command and returns the applicable results. it's giving "combination of directive type and operation", plus the target directive and its enable/disable status of the operation β€” but only if that specific operation needs it. iykyk πŸ’…

the <device> parameter is mandatory, bestie, don't forget it. it can be either the NVMe character device (ex: /dev/nvme0) or a namespace block device (ex: /dev/nvme0n1). either works, pick your fighter ✨

on success, the returned directive's parameter structure (if applicable) comes back in one of several ways depending on the option flags β€” the structure may be parsed by the program and displayed in hex, or the raw buffer may be printed to stdout so another program can parse it. main character energy, honestly.

⚠️ heads up: the bare nvme dir-send form (without a space) still works as a deprecated alias and will be removed in a future major version. so like, it's not gone yet, but it's on notice πŸ’€ new scripts should use nvme dir send instead. periodt.

πŸ’– OPTIONS πŸ’–

  • -n <nsid>, --namespace-id=<nsid> β€” retrieve the feature for the given nsid. this one's optional and most features don't even use this value. also, the broadcast value 0xffffffff can be given as all or -1. cute right? 🌈
  • -D <dtype>, --dir-type=<dtype> β€” directive type. that's it, that's the whole description, she's mysterious πŸŽ€
  • -S <dspec>, --dir-spec=<dspec> β€” directive specific.
  • -O <doper>, --dir-oper=<doper> β€” directive operation.
  • -T <tdir>, --target-dir=<nsr> β€” target directive of the operation.
  • -e <endir>, --endir=<endir> β€” target directive enable (1) or disable (0) operation. here's the mapping, since the original had a whole table and we're translating it to vibes ✨:
    • 0 β€” Current
    • 1 β€” Default
    • 2 β€” Saved
    • 3 β€” Supported capabilities
    • 4–7 β€” Reserved
  • -l <data-len>, --data-len=<data-len> β€” the data length for the buffer returned for this feature. most known features don't use this value. the exception is LBA Range Type πŸ‘‘
  • -b, --raw-binary β€” print the raw receive buffer to stdout if the command returns a structure. no parsing, just raw bytes, we love a minimal queen 🧚

πŸ‘‘ GLOBAL OPTIONS πŸ‘‘

these ones live at the top-level nvme command and are available to this subcommand. so they're not technically ours, but they're absolutely invited to the group chat:

  • --dry-run β€” print the command that would be executed, but do not actually execute it. all the fun, zero consequences πŸ™ˆ
  • --no-ioctl-probing β€” disable probing for 64-bit IOCTL support.
  • --no-retries β€” disable retry logic on transient errors. one shot, one opportunity πŸ’€
  • -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, so don't get greedy ✨
  • --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. the audacity πŸ’…
  • --quiet β€” suppress informational messages. errors are still reported, and --quiet cancels any --verbose for the library log level. she's silencing the noise but never the tea 🍡
  • --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). literally forever, no cap ⏳
  • -v, --verbose β€” increase the level of detail in the output. may be specified multiple times to further increase verbosity. stack those v's, she's got layers πŸ’œ

these options can also be set as machine-wide defaults in nvme-cli.conf(5). and a command-line flag always overrides the file β€” flags are the main character here, always πŸŽ€


πŸ”₯ EXAMPLES πŸ”₯

okay here's where it gets fun, actual receipts:

  • enable streams directive :
# nvme dir send /dev/nvme0n1 --dir-type 0 --dir-oper 1 --target-dir 1 --endir 1
  • disable streams directive :
# nvme dir send /dev/nvme0n1 --dir-type 0 --dir-oper 1 --target-dir 1 --endir 0
  • release all allocated streams resource :
# nvme dir send /dev/nvme0n1 --dir-type 1 --dir-oper 2
  • release stream ID 3 :
# nvme dir send /dev/nvme0 --dir-type 1 --dir-oper 1 --dir-spec 3
⚠️ it is probably a bad idea to not redirect stdout when using this mode. like... genuinely. redirect it. save yourself the pain 😭

🧚 NVME 🧚

part of the nvme-user suite. she's in the family, she belongs 🌈


πŸ’Œ okay that's the pageeee β€” this whole thing is from the NVMe Manual, NVME-DIR-SEND(1), dated 10/30/2026. go send some directives bestie, you got this πŸ’–πŸŽ€βœ¨πŸ¦‹
πŸ“¦ where this page comes from