NVME-OCP-SET-ERRO(1) NVMe Manual NVME-OCP-SET-ERRO(1)

# [NAME](#NAME)

nvme-ocp-set-error-injection - Inject error conditions

# [SYNOPSIS](#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](#DESCRIPTION)

Inject error conditions.

The &lt;device&gt; parameter is mandatory NVMe character device (ex: /dev/nvme0).

This will only work on OCP compliant devices supporting this feature. Results for any other device are undefined.

On success it returns 0, error code otherwise.

# [OPTIONS](#OPTIONS)

-d &lt;file&gt;, --data=&lt;file&gt;

Error injection data structure entries

-n &lt;num&gt;, --number=&lt;num&gt;

Number of valid error injection data entries

-N, --no-uuid

Do not try to automatically detect UUID index for this command (required for old OCP 1.0 support)

-a, --all-ns

Apply to all namespaces

-t &lt;type&gt;, --type=&lt;type&gt;

Error injection type (1-22: see NOTES section for valid types)

-r &lt;num&gt;, --nrtdp=&lt;num&gt;

Number of reads to trigger device panic

# [GLOBAL OPTIONS](#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.

--no-ioctl-probing

Disable probing for 64-bit IOCTL support.

--no-retries

Disable retry logic on transient errors.

-o &lt;fmt&gt;, --output-format=&lt;fmt&gt;

Set the reporting format to *normal*, *tabular, 'json*, or *binary*. Only one output format may be used at a time.

--output-format-version=&lt;version&gt;

Select the output format version. Version *1* uses the original field naming, while version *2* (default) provides more consistent and script-friendly field names.

--timeout=&lt;ms&gt;

Set the timeout for the command in milliseconds.

-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)](/man/os/nvme-cli/nvme-cli.conf.5). A command-line flag always overrides the file.

# [EXAMPLES](#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](#NOTES)

Valid error injection types: 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](#NVME)

Part of the nvme-user suite.

09/18/2026 NVMe

---

Document: nvme-ocp-set-error-injection(1) from nvme-cli 3.1-r1 (Chainguard OS)
Source: https://github.com/linux-nvme/nvme-cli
