NVME-DSM(1)

๐Ÿ’… NVME-DSM(1) โ€” nvme-dsm โœจ

okay so this is a page from the NVMe manual, section 1, and it's all about nvme-dsm โ€” sending a Data Set Management command and getting the results back. bestie, let's get into it ๐Ÿซถ


๐ŸŒธ NAME ๐ŸŒธ

nvme-dsm โ€” Send NVMe Data Set Management, return results ๐Ÿ’Œ


โœจ SYNOPSIS โœจ

nvme [<global-options>] dsm <device> [--namespace-id=<nsid> | -n <nsid>]
                        [--ctx-attrs=<attribute-list,> | -a <attribute-list,>]
                        [--blocks=<nlb-list,> | -b <nlb-list,>]
                        [--slbs=<slba-list,> | -s <slba-list,>]
                        [--ad=<deallocate> | -d <deallocate>]
                        [--idw=<write> | -w <write>] [--idr=<read> | -r <read>]
                        [--cdw11=<cdw11> | -c <cdw11>]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so for the NVMe device you hand it, this sends a Data Set Management command and gives you back the result and the returned structure. no cap. ๐Ÿ“ฌ

the <device> parameter is mandatory โ€” like, you literally cannot skip it โ€” and it can be either the NVMe character device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1). if you give it the character device, then the --namespace-id option is mandatory too, otherwise it'll just use the ns-id of the namespace for the block device you opened. and for block devices, the ns-id it uses can be overridden with that same option. iykyk ๐Ÿ’…

you must specify at least one of the values for the range list. and if the range lists you provide don't list the same number of elements, the default values for the remaining ones in the range get set to 0. lowkey important ๐Ÿ”ฅ

the command dword 11 may be provided at the command line. for convenience, the current defined attributes (discard, integral read/write) for a data-set management have flags. if cdw11 is specified, that will override any settings the flags may have provided โ€” so yeah, it wins, periodt ๐Ÿ‘‘


๐ŸŽ€ OPTIONS ๐ŸŽ€

  • -n <nsid>, --namespace-id=<nsid> โ€” sends the command with the requested nsid. this is required for the character devices, or overrides the block nsid if given. the broadcast value 0xffffffff can also be given as all or -1. ๐Ÿฉท
  • -a <attribute-list,>, --ctx-attrs=<attribute-list> โ€” comma separated list of the context attributes in each range โœจ
  • -b <nlb-list,>, --blocks=<nlb-list,> โ€” comma separated list of the number of blocks in each range ๐Ÿงฎ
  • -s <slba-list,>, --slbs=<slba-list,> โ€” comma separated list of the starting block in each range ๐Ÿšฉ
  • -d <deallocate>, --ad=<deallocate> โ€” Attribute Deallocate. ๐Ÿ—‘๏ธ
  • -w <write>, --idw=<write> โ€” Attribute Integral Dataset for Write. โœ๏ธ
  • -r <read>, --idr=<read> โ€” Attribute Integral Dataset for Read. ๐Ÿ“–
  • -c <cdw11>, --cdw11=<cdw11> โ€” all the command command dword 11 attributes. use exclusive from specifying individual attributes โš ๏ธ
heads up: that -c one is exclusive from specifying the individual attributes โ€” pick a lane, bestie ๐Ÿ’€

๐ŸŒˆ GLOBAL OPTIONS ๐ŸŒˆ

the following options are defined at the top-level nvme command and are available to this subcommand:

  • --dry-run โ€” print the command that would be executed, but do not actually execute it. fake it till you make it ๐Ÿ™ˆ
  • --no-ioctl-probing โ€” disable probing for 64-bit IOCTL support. ๐Ÿ”ง
  • --no-retries โ€” disable retry logic on transient errors. one shot, no second chances ๐Ÿ’€
  • -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. (yes, the quote mark before json is literally in the original, don't come for me ๐Ÿซถ)
  • --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. ๐Ÿคซ
  • --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). โณ
  • -v, --verbose โ€” increase the level of detail in the output. may be specified multiple times to further increase verbosity. ๐Ÿ—ฃ๏ธ

these options can also be set as machine-wide defaults in nvme-cli.conf(5). a command-line flag always overrides the file. ๐Ÿ‘‘


๐Ÿ“ EXAMPLES ๐Ÿ“

No examples yet ๐Ÿ˜ญ (iconic of them to leave us hanging tbh)


๐Ÿ‘‘ NVME ๐Ÿ‘‘

part of the nvme-user suite ๐Ÿ’œ


so yeah, that's the whole thing, bestie โ€” go send some Data Set Management commands and slay ๐Ÿงšโœจ

nvme-user suite ยท NVMe manual page dated 10/30/2026 ยท you're so welcome ๐Ÿ’–

๐Ÿ“ฆ where this page comes from