NVME-OCP-SET-ERRO(1)
β¨ 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 from1to22. 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 tonormal,tabular,'json, orbinary. 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. version1uses the original field naming, while version2(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--quietcancels any--verbosefor the library log level π€«--set-options=<key=value>[,<key=value>...]β set libnvme library options for this invocation. supported keys areforce-4k,mi-probe-enabled,test-base-dirandtest-sysfs-dirπ§--timeout=<ms>β set the timeout for the command in milliseconds.infiniteor-1waits 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 π :
- CPU/controller hang
- NAND hang
- PLP defect
- Logical firmware error
- DRAM corruption critical path
- DRAM corruption non-critical path
- NAND corruption
- SRAM corruption
- HW malfunction
- No more NAND spares available
- Incomplete shutdown
- Metadata corruption
- Critical garbage collection
- Latency spike
- I/O command failure
- I/O command timeout
- Admin command failure
- Admin command timeout
- Thermal throttle engaged
- Thermal throttle disengaged
- Critical temperature event
- 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
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms