NVMe Format NVM
NVMe Format NVM is an administrative command that selects a supported media format and can request secure erasure.
For the NVM Command Set, formatting selects logical-block format, metadata placement and protection-information settings. This is not filesystem creation. After a successful format, the controller shall not return user data previously contained in an affected namespace. [1]
Secure Erase Settings (SES) distinguish no secure erase (0), User Data Erase (1) and Cryptographic Erase (2), with 3 to 7 reserved. User Data Erase may use cryptographic erase when all affected data is encrypted. SES=0 does not make formatting nondestructive. [3]
Scope depends on SES, Format NVM Attributes (FNA) and NSID. Without secure erase FNA bit 0 decides the scope, and with SES 1 or 2 FNA bit 1 does. A selected namespace does not always confine the operation: when the relevant bit is 1, all namespaces in the NVM subsystem are formatted. NSID FFFFFFFFh otherwise selects all namespaces attached to the controller. [1]
The reference command-line tool defaults to LBA format 0 and a 600,000 ms command timeout, then issues BLKRRPART so namespaces are rescanned. With an older driver, a changed block size may only appear after a manual rescan. [3]
NVM Command Set 1.0e requires PIL=0, placing enabled PI at the end of metadata. CLI options do not establish support for first-byte placement in this revision. [2] [3]
Relations
Advantages
- Format NVM selects supported protection-information settings alongside the LBA format. [2]
- A Cryptographic Erase removes access by deleting the encryption key instead of rewriting all user data. [1]
Limitations
- Device names alone do not establish controller-to-namespace relationships. [3]
- While a format runs, I/O commands to an affected namespace may be aborted with Format in Progress status. [1]
Citations
- NVM Express Base Specification 2.0e, section 5.14 and Identify Controller FNA field
- NVM Express NVM Command Set Specification 1.0e, section 4.1.2, Figure 78 (p. 46); copyright 2008 to 2024 NVM Express, Inc. ALL RIGHTS RESERVED.
- linux-nvme/nvme-cli v2.11: Format NVM documentation
Sources & caveats
- Specification review, not a hardware erasure test. The cited revisions are a reference baseline, not a latest-version claim.
- nvme-2-0e is NVM Express Base Specification 2.0e, read 2026-10-23 at section 5.14 and Figure 193 for scope rules and the security-specification abort case.
- nvme-format-v211 is the nvme-cli v2.11 nvme-format documentation, re-read for SES and PI values, the 600,000 ms default timeout and the BLKRRPART rescan.
- A companion analysis covers the full scope matrix. Device capabilities should be checked before any destructive action.
- The tcg-opal entry links here because section 5.14 lets a security specification such as TCG storage interface rules abort a Format NVM command.