NVME-LOG-SANITIZE(1)

πŸ“¦ version 3.2, in arch rolling

🌸 nvme-log-sanitize(1) β€” like, the sanitize log page, bestie πŸ’…

okay so real quick: this is nvme-log-sanitize, part of the NVMe Manual, and it's genuinely one of the more underrated little commands. it's giving "quietly knows everything about your drive's sanitize history" and honestly? obsessed. ✨


πŸ’– NAME

nvme-log-sanitize β€” send the NVMe sanitize-log Command and hand you back the result, no cap.


πŸŽ€ SYNOPSIS

nvme [<global-options>] log sanitize <device> [--rae | -r]
                        [--raw-binary | -b]

πŸ¦‹ DESCRIPTION

So what this does is it retrieves the NVMe Sanitize log page from an NVMe device and gives you back the status of the sanitize command. that's the whole vibe check. 🫢

The <device> parameter is mandatory and it's the NVMe character device (ex: /dev/nvme0). no device, no log, sorry bestie 😭

Expected status and description, literally all of them:

  • 0x0000 β€” NVM subsystem has never been sanitized.
  • 0x0001 β€” The most recent sanitize operation completed successfully.
  • 0x0002 β€” A sanitize operation is currently in progress.
  • 0x0003 β€” The most recent sanitize operation failed.
  • 0x0100 β€” Global Data Erased bit. If set to 1 then non-volatile storage in the NVM subsystem has not been written to: a) since being manufactured and the NVM subsystem has never been sanitized; or b) since the most recent successful sanitize operation. If cleared to 0, then non-volatile storage in the NVM subsystem has been written to: a) since being manufactured and the NVM subsystem has never been sanitized; or b) since the most recent successful sanitize operation of the NVM subsystem.
  • 0x0800 β€” Purged (PRGD) bit. If set to 1, then the most recent sanitize operation purged user data, as defined by IEEE Std 2883, because the Purge Required (PREQ) bit was set to 1 in the command that started that sanitize operation. If cleared to 0, either PREQ was not set, or the sanitize operation cleared (rather than purged) user data.

Sanitize Progress β€” percentage complete πŸ‘‘

On success it returns 0, error code otherwise.


✨ OPTIONS ✨

  • -r, --rae β€” Retain an Asynchronous Event.
  • -b, --raw-binary β€” Print the raw buffer to stdout. Structure is not parsed by the program. This overrides the vendor specific and human readable options. (fr fr, it's a raw dump, act accordingly πŸ’€)

🌈 GLOBAL OPTIONS

These are defined at the top-level nvme command and, good news, they're available to this subcommand too:

  • --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 <fmt>, --output-format=<fmt> β€” Set the reporting format to normal, tabular, 'json, or binary. Only one output format may be used at a time.
  • --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. (spam it, go off πŸ—£οΈ)

These options can also be set as machine-wide defaults in nvme-cli.conf(5). A command-line flag always overrides the file. periodt.


πŸ“ EXAMPLES

  • Has the program issue Sanitize-log Command:
# nvme log sanitize /dev/nvme0

like, that's it. that's the whole thing. iconic. ⭐


πŸ’œ NVME

Part of the nvme-user suite.


ngl bestie, if you made it this far you're officially the main character of NVMe log pages. go check that sanitize status, ily πŸ’–βœ¨

and that's the whole page!! brought to you by NVMe β€” dated 10/30/2026 β€” mwah, see u in the next manpage πŸ§šπŸ’…

πŸ“¦ where this page comes from