NVME-DIR-RECEIVE(1)

πŸ’… NVME-DIR-RECEIVE(1) β€” the nvme manual, bestie edition

okay so you're looking at nvme-dir-receive, a page from the NVMe Manual (yes, that NVMe manual), and honestly? it's giving "powerful but under-explained". so let me translate ✨


🌸 NAME

nvme-dir-receive β€” send a directive receive command, and it returns the applicable results. that's the whole job. it's literally in the name, no cap πŸ’…


πŸ¦‹ SYNOPSIS

nvme [<global-options>] dir receive <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>]
                        [--req-resource=<nsr> | -r <nsr>] [--raw-binary | -b]

like, look at her. so many flags. she's an icon πŸ‘‘


πŸ’– DESCRIPTION

so what this does: it submits an NVMe Directive Receive admin command and hands you back the applicable results. that could be the combination of directive type and operation, plus the number of requested resources if that specific operation needs it. it's giving "here's your data, bestie, as requested" πŸŽ€

the <device> parameter is mandatory β€” not optional, not vibes-based, mandatory β€” and it can be either:

  • the NVMe character device (ex: /dev/nvme0), or
  • a namespace block device (ex: /dev/nvme0n1)

on success, the returned directive's parameter structure (if applicable) comes back to you in one of several ways, and it all depends on which option flags you used:

  • the structure may be parsed by the program and printed in a readable format if it's a known structure ✨
  • it can be displayed in hex πŸ”
  • or the raw buffer may be printed to stdout so another program can parse it 🫢
🚨 heads up about the old spelling: the bare nvme dir-receive form (without a space) still works as a deprecated alias and will be removed in a future major version. new scripts should use nvme dir receive instead. do not be out here writing new scripts with the deprecated form, i'm begging 😭

✨ OPTIONS ✨

  • -n <nsid>, --namespace-id=<nsid> β€” retrieve the feature for the given nsid. this is optional, and most features don't even use this value. the broadcast value 0xffffffff can also be given as all or -1. iykyk πŸ’«
  • -D <dtype>, --dir-type=<dtype> β€” directive type 🎯
  • -S <dspec>, --dir-spec=<dspec> β€” directive specific
  • -O <doper>, --dir-oper=<doper> β€” directive operation
  • -r <nsr>, --req-resource=<nsr> β€” directive requested resource count. here's the select breakdown, pls memorize the vibe:
    • 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. raw. unfiltered. main character energy 🧚

🌈 GLOBAL OPTIONS 🌈

these ones are defined at the top-level nvme command and are available to this subcommand too β€” so you get the whole squad, not just the solo act πŸ’œ

  • --dry-run β€” print the command that would be executed, but do not actually execute it. it's a dress rehearsal, bestie 🎭
  • --no-ioctl-probing β€” disable probing for 64-bit IOCTL support.
  • --no-retries β€” disable retry logic on transient errors. one shot, no take-twos πŸ’€
  • -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, periodt.
  • --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 β€” no exceptions, no negotiating πŸ™…β€β™€οΈ
  • --quiet β€” suppress informational messages. errors are still reported, and --quiet cancels any --verbose for the library log level. the "shush" button 🫢
  • --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). patient queen vibes ⏳
  • -v, --verbose β€” increase the level of detail in the output. may be specified multiple times to further increase verbosity. stack it like a combo πŸ”₯

and yes β€” these options can also be set as machine-wide defaults in nvme-cli.conf(5). a command-line flag always overrides the file. flag wins, every time. no debate πŸ’…


πŸŽ€ EXAMPLES πŸŽ€

  • identify directive type supported:
# nvme dir receive /dev/nvme0 --dir-type 0 --dir-oper 1 --verbose
  • get stream directive parameters:
# nvme dir receive /dev/nvme0 --dir-type 1 --dir-oper 1 --verbose
  • allocate 3 streams for namespace 1:
# nvme dir receive /dev/nvme0n1 --dir-type 1 --dir-oper 3 --req-resource 3 --verbose
  • get streams directive status:
# nvme dir receive /dev/nvme0 --dir-type 1 --dir-oper 2 --verbose
😭 it is probably a bad idea to not redirect stdout when using this mode. like. genuinely. redirect it. > file is your bestie here, fr fr.

⭐ NVME

part of the nvme-user suite 🫢 that's the family, that's the crew, that's the whole thing.


and that's the page, gorgeous πŸ’– this one's from the NVMe folks, dated 10/30/2026 β€” NVME-DIR-RECEIVE(1) and all, slay πŸŒˆβœ¨πŸ‘‘

πŸ“¦ where this page comes from