NVME-OCP-SET-ERRO(1)

πŸ“¦ version 3.2, in arch rolling

✨ nvme-ocp-set-error-injection(1) ✨

okay so bestie, welcome to the nvme manual (yes, that's the manual name, and yes it's part of the nvme-user suite). this page is all about nvme-ocp-set-error-injection and honestly? it's giving "i'm about to break things on purpose" energy πŸ’…


🌸 NAME 🌸

nvme-ocp-set-error-injection β€” inject error conditions 🫢


⭐ SYNOPSIS ⭐

nvme [<global-options>] ocp set-error-injection <device>
                        [--data=<file> | -d <file>]
                        [--number=<num> | -n <num>]
                        [--no-uuid | -N]
                        [--all-ns | -a]
                        [--type=<type> | -t <type>]
                        [--nrtdp=<num> | -r <num>]

πŸ’– DESCRIPTION πŸ’–

It injects error conditions. That's the whole vibe. You are literally telling the device "hey bestie, please have a problem" πŸ”₯

The <device> parameter is mandatory and it's gotta be an NVMe character device (for example /dev/nvme0). No device, no command, periodt.

⚠️ Heads up: this will only work on OCP compliant devices that support this feature. Results for any other device are undefined β€” like, we genuinely don't know what happens. So maybe don't πŸ™ˆ

On success it returns 0. Otherwise you get an error code. That's it, that's the deal πŸ’€


πŸŽ€ OPTIONS πŸŽ€

  • -d <file>, --data=<file> β€” the error injection data structure entries. this is your actual payload, the whole reason you're here πŸ“
  • -n <num>, --number=<num> β€” how many valid error injection data entries there are. count them, bestie, don't lie ✨
  • -N, --no-uuid β€” don't try to automatically detect the UUID index for this command. required for old OCP 1.0 support, so if you're on the vintage firmware, this one's your girl πŸ‘‘
  • -a, --all-ns β€” apply to all namespaces. every single one. no namespace left behind πŸ¦‹
  • -t <type>, --type=<type> β€” error injection type, ranges from 1 to 22. scroll down to the NOTES section for the full valid list, iykyk πŸ’œ
  • -r <num>, --nrtdp=<num> β€” number of reads to trigger device panic. yes. that's literally what it says. main character energy but make it catastrophic πŸ’€πŸ”₯

🌈 GLOBAL OPTIONS 🌈

bestie these live at the top-level nvme command, but they're available to this subcommand too, so you're not missing out 🫢

  • --dry-run β€” print the command that would be executed, but do not actually execute it. the "look but don't touch" of flags πŸ™ˆ
  • --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 at a time, so pick a lane πŸ’… (yes, that apostrophe before json is literally in the original, we don't ask questions)
  • --output-format-version=<version> β€” select the output format version. version 1 uses the original field naming, while version 2 (the default) provides more consistent and script-friendly field names. other versions are rejected, no cap 🚫
  • --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. go off, stack them πŸ‘‘
  • -o... ok no that's not a thing, ignore that, we already covered it 😭

These options can also be set as machine-wide defaults in nvme-cli.conf(5). a command-line flag always overrides the file β€” flags win, always, no arguments πŸ’–


πŸ¦‹ EXAMPLES πŸ¦‹

  • Has the program issue a set-error-injection with the 2 entries data file.
# nvme ocp set-error-injection /dev/nvme0 -d data.bin -n 2
  • Has the program issue a set-error-injection with the 5 reads trigger NAND hang.
# nvme ocp set-error-injection /dev/nvme0 -t 2 -r 5
  • Has the program issue a set-error-injection for all namespaces with type 1.
# nvme ocp set-error-injection /dev/nvme0 -a -t 1

🧚 NOTES 🧚

Valid error injection types, and lemme tell you, this list ate πŸ’…:

  1. CPU/controller hang
  2. NAND hang
  3. PLP defect
  4. Logical firmware error
  5. DRAM corruption critical path
  6. DRAM corruption non-critical path
  7. NAND corruption
  8. SRAM corruption
  9. HW malfunction
  10. No more NAND spares available
  11. Incomplete shutdown
  12. Metadata corruption
  13. Critical garbage collection
  14. Latency spike
  15. I/O command failure
  16. I/O command timeout
  17. Admin command failure
  18. Admin command timeout
  19. Thermal throttle engaged
  20. Thermal throttle disengaged
  21. Critical temperature event
  22. Die offline

πŸ’œ NVME πŸ’œ

Part of the nvme-user suite. iconic, honestly 🌟


okay that's the whole page bestie, go forth and inject responsibly πŸ’–βœ¨

nvme-user suite Β· NVMe manual Β· 10/30/2026 β€” mwah, see you in the group chat πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from