NVME-COPY(1)

πŸ’… nvme-copy β€” like, the manual page bestie

okay so this is nvme-copy from the NVMe Manual (yes, the NVMe Manual, we're fancy here), and it's literally the page for sending an NVMe Simple Copy command, and it gives you the results back. no cap. ✨


✨ NAME ✨

nvme-copy β€” send an NVMe Simple Copy command, and it provides results back to you 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

nvme [<global-options>] copy <device>
                          [--namespace-id=<nsid> | -n <nsid>]
                          [--sdlba=<sdlba> | -d <sdlba>]
                          [--blocks=<nlb-list,> | -b <nlb-list,>]
                          [--slbs=<slbas,> | -s <slbas,>]
                          [--snsids=<snsids,> | -N <snsids,>]
                          [--sopts=<sopts,> | -O <sopts,>]
                          [--limited-retry | -l]
                          [--force-unit-access | -f]
                          [--prinfow=<prinfow> | -p <prinfow>]
                          [--prinfor=<prinfor> | -P <prinfor>]
                          [--ref-tag=<reftag> | -r <reftag>]
                          [--expected-ref-tags=<reftag,> | -R <reftag,>]
                          [--app-tag=<apptag> | -a <apptag>]
                          [--expected-app-tags=<apptag,> | -A <apptag,>]
                          [--app-tag-mask=<appmask> | -m <appmask>]
                          [--expected-app-tag-masks=<appmask,> | -M <appmask,>]
                          [--dir-type=<type> | -T <type>]
                          [--dir-spec=<spec> | -S <spec>]
                          [--format=<entry-format> | -F <entry-format>]

🌸 DESCRIPTION 🌸

so the Copy command is what the host uses to copy data from one or more source logical block ranges into a single consecutive destination logical block range. slay, it's giving consolidation. πŸ’–

The <device> parameter is mandatory, bestie β€” don't forget it β€” and it can be either the NVMe character device (ex: /dev/nvme0) or a namespace block device (ex: /dev/nvme0n1). πŸŽ€

Here's the tea on how it picks the ns-id: if you give it the character device, then the --namespace-id option is mandatory, fr fr. Otherwise (block device) it will just use the ns-id of the namespace of the block device you opened. And for block devices, you can still override the ns-id it uses with that same option. iykyk. 🐝


πŸ’… OPTIONS πŸ’…

  • -n <nsid>, --namespace-id=<nsid> β€” sends the command with the nsid you asked for. This is required for character devices, or it overrides the block nsid if you give it. also, the broadcast value 0xffffffff can be given as all or -1. iconic little shortcut. ✨
  • -d <sdlba>, --sdlba=<sdlba> β€” the 64-bit addr of the first destination logical block. like, where the copied stuff lands. πŸ“
  • -b <nlb-list,>, --blocks=<nlb-list,> β€” comma separated list of the number of blocks in each range.
  • -s <slbas,>, --slbs=<slbas,> β€” comma separated list of the starting blocks in each range.
  • --snsids=<snsids,>, -N <snsids,> β€” comma separated list of the source namespace identifiers in each range.
  • --sopts=<sopts,>, -O <sopts,> β€” comma separated list of the source options in each range.
  • -l, --limited-retry β€” sets the limited retry flag. βœ…
  • -f, --force-unit-access β€” set the force-unit access flag. πŸ’ͺ
  • -p <prinfow>, --prinfow=<prinfow> β€” Protection Information field write definition.
  • -P <prinfor>, --prinfor=<prinfor> β€” Protection Information field read definition. (capital P, don't mix these up bestie 😭)
  • -r <reftag>, --ref-tag=<reftag> β€” initial lba reference tag.
  • -R <reftag,>, --expected-ref-tags=<reftag,> β€” expected lba reference tags (comma-separated list).
  • -a <apptag>, --app-tag=<apptag> β€” lba app tag.
  • -A <apptag,>, --expected-app-tags=<apptag,> β€” expected lba app tags (comma-separated list).
  • -m <appmask>, --app-tag-mask=<appmask> β€” lba tag mask.
  • -M <appmask,>, --expected-app-tag-masks=<appmask,> β€” expected lba tag masks (comma-separated list).
  • -T <type>, --dir-type=<type> β€” optional directive type. heads up: the nvme-cli only enforces that the value be in the defined range for the directive type, though the NVMe specification (1.3a) defines only one directive, 01h, for write stream identifiers. so like, don't expect it to read your mind. πŸ’€
  • -S <spec>, --dir-spec=<spec> β€” optional field for directive specifics. when it's used with write streams, this value is defined to be the write stream identifier. and ngl, the nvme-cli will not validate that the stream you requested is within the controller's capabilities. so that's on you, bestie. 🫢
  • -F <entry-format>, --format=<entry-format> β€” source range entry format.

πŸ‘‘ GLOBAL OPTIONS πŸ‘‘

these are defined at the top-level nvme command and, yes, they're available to this subcommand too. main character options honestly. 🌈

  • --dry-run β€” print the command that would be executed, but do not actually execute it. rehearsal only, no commitment. 🎭
  • --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 to normal, tabular, 'json, or binary. only one output format may be used at a time. pick one, king. πŸ‘‘
  • --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. shhh. 🀫
  • --set-options=<key=value>[,<key=value>...] β€” set libnvme library options for this invocation. the 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). the patience of a saint, honestly. 😭
  • -v, --verbose β€” increase the level of detail in the output. may be specified multiple times to further increase verbosity. spam that flag, bestie. πŸ“ˆ
these options can also be set as machine-wide defaults in nvme-cli.conf(5). and a command-line flag always overrides the file. always. no exceptions. πŸ’…

πŸ“ EXAMPLES πŸ“

No examples yet.

(yeah. that's it. that's the whole examples section. we're manifesting examples into existence later, ok? πŸ™ˆ)


🧚 NVME 🧚

Part of the nvme-user suite. 🫢 you love to see it.


and that's the page!! NVMe β€” 10/30/2026 β€” NVME-COPY(1) πŸŽ€πŸ’–βœ¨ go copy some blocks, bestie, you're gonna ate. πŸ¦‹

πŸ“¦ where this page comes from