| NVMEADM(8) | Maintenance Commands and Procedures | NVMEADM(8) |
nvmeadm — NVMe
administration utility
nvmeadm |
-h [command] |
nvmeadm |
[-dv] list
[-c] [-p
-o field[,...]]
[ctl[/ns][,...]] |
nvmeadm |
[-dv] identify
[-C | -c |
-d | [-a]
-n] ctl[/ns][,...] |
nvmeadm |
[-dv]
identify-controller [-C |
-c | [-a]
-n] ctl[,...] |
nvmeadm |
[-dv] identify-namespace
[-c | -d]
ctl/ns[,...] |
nvmeadm |
[-dv] list-logpages
[-a] [-H]
[-o field[,...]
[-p]] [-s
scope[,...]] ctl[/ns][,...]
[logpage...] |
nvmeadm |
[-dv] get-logpage
[-O output-file]
ctl[/ns][,...] logpage |
nvmeadm |
[-dv] list-features
[-a] [-H]
[-o field[,...]
[-p]] ctl[/ns][,...]
[feature...] |
nvmeadm |
[-dv] get-features
ctl[/ns][,...]
[feature-list] |
nvmeadm |
[-dv] format
ctl[/ns] [lba-format] |
nvmeadm |
[-dv] secure-erase
[-c] ctl[/ns] |
nvmeadm |
[-dv] create-namespace
-b block-size |
-f flbas
[-c cap]
[-n nmic]
[-t type]
ctl size |
nvmeadm |
[-dv] delete-namespace
ctl/ns |
nvmeadm |
[-dv] attach-namespace
ctl/ns |
nvmeadm |
[-dv] detach-namespace
ctl/ns |
nvmeadm |
[-dv] attach
ctl[/ns] |
nvmeadm |
[-dv] detach
ctl[/ns] |
nvmeadm |
[-dv] list-firmware
ctl |
nvmeadm |
[-dv] load-firmware
ctl firmware-file
[offset] |
nvmeadm |
[-dv] commit-firmware
ctl slot |
nvmeadm |
[-dv] activate-firmware
ctl slot |
nvmeadm |
[-dv] vendor-cmd
-O opcode
[-n nsid]
[--cdw12 cdw12]
[--cdw13 cdw13]
[--cdw14 cdw14]
[--cdw15 cdw15]
[-l length
[-i file |
-o file]]
[-L lock]
[-I
impact[,...]]
[-t timeout]
ctl[/ns] |
nvmeadm |
[-dv] sandisk/hwrev
ctl |
nvmeadm |
[-dv] sandisk/pci-eye
-l lane
-o output
ctl |
nvmeadm |
[-dv] wdc/e6dump
-o output
ctl |
nvmeadm |
[-dv] wdc/resize
-s size |
-g ctl |
nvmeadm |
[-dv] wdc/clear-assert
ctl |
nvmeadm |
[-dv] wdc/inject-assert
ctl |
The nvmeadm utility can be used to
enumerate the NVMe controllers and their namespaces, query hardware
information from a NVMe controller or namespace, and to format or
secure-erase a NVMe controller or namespace.
The information returned by the hardware is printed by
nvmeadm in a human-readable form were applicable.
Generally all 0-based counts are normalized and values may be converted to
human-readable units such as MB (megabytes), W (watts), or C (degrees
Celsius).
The following options are supported:
nvmeadm expects the following kinds of
arguments:
nvmeadm understands. See section
COMMANDS.identify command. The namespace ID is a positive
non-zero decimal number. For commands that don't change the device state
multiple controllers and namespaces can be specified as a comma-separated
list.
The list of controllers and namespaces present in the system
can be queried with the list command without any
arguments.
get-logpage
command.get-features command. Feature names can be
specified in upper or lower case. All features can be specified either by
a short name listed below or by the full name that the specification
uses.format command. The list of supported LBA formats
on a namespace can be retrieved with the nvmeadm
identify command.load-firmware command.For more information on the differences between these, please see the NVMe specification.
This is used by the create-namespace
command.
commit-firmware command, and subsequently
activated with the activate-firmware command.
Slots and their contents can be printed using the
nvmeadm list-firmware
command.nvmeadm list
[-c] [-p
-o field[,...]]
[ctl[/ns][,...]]-v option to
nvmeadm, all possible namespaces of the
controllers will be listed.
The nvmeadm
list command supports the following options:
-c-p-o option.-o
field[,...]The following fields can be specified when using the parsable form:
In addition, the following fields can be specified when
listing namespaces, not using the -c option:
nvmeadm operations.data+meta’. For example, a 4K
formatted namespace with no metadata sectors would be shown as
‘4096+0’. A 512-byte formatted
namespace with 16 bytes of metadata (perhaps for end-to-end data
protection) would be formatted as
‘4096+16’.format subcommand.When using the -c option to list
controllers, the following additional fields are supported:
nvmeadm
identify-controller [-C |
-c | [-a]
-n] ctl[,...]By default, a relevant subset of the "IDENTIFY CONTROLLER" data structure is printed. The full data structure is only printed when verbose output is requested.
The following options can be used to print other "IDENTIFY" information:
-C-a-n option to print the
list allocated namespace identifiers. Can only be specified together
with the -n option.-c-nnvmeadm identify-namespace
[-c | -d]
ctl/ns[,...]By default, a relevant subset of the "IDENTIFY NAMESPACE" data structure is printed. The full data structure is only printed when verbose output is requested.
The following options can be used to print other "IDENTIFY" information:
nvmeadm identify
[-C | -c |
-d | [-a]
-n] ctl[/ns][,...]identify-controller and
identify-namespace commands, prints the same
information about the specified controllers and/or namespaces, depending
on whether a controller or a namespace was specified.
For a description of the various optional flags refer to the
above description of the identify-controller and
identify-namespace commands.
nvmeadm [-dv]
list-logpages [-a]
[-H] [-o
field[,...] [-p]]
[-s scope[,...]]
ctl[/ns][,...] [logpage...]The nvmeadm
list-logpages command supports the following
options:
-a-H-o
field[,...]-p-o option.-s
scope[,...]The following fields are supported:
get-logpage command.
This is a shortened form from the NVMe or vendor-specific
documentation.get-logpage
command to get the log.The list-logpages command supports a
series of operands which can be used to filter the list of log pages
that information is printed out about. Each
logpage operand is the name of a log page. Only
matching log pages will be printed and if no log pages match a given
operand argument or not log pages are printed at all (which can happen
due to a log being unsupported) then the command will generate an
error.
nvmeadm get-logpage
[-O output-file]
ctl[/ns][,...] logpage-O is specified, rather than print
the contents of the log, the raw binary payload of the log will be written
to output-file. Most log pages are only available on
a per-controller basis. Known log pages are:
-O option be specified.The following vendor-specific log pages are supported. Not all
devices from a vendor support every log page. Use the
list-logpages command to determine which are
supported for a given device and whether they operate on a controller or
namespace.
For an explanation of the contents of the log pages refer to the description of the "GET LOGPAGE" admin command in the NVMe specification.
nvmeadm list-features
[-a] [-H]
[-o field[,...]
[-p]] ctl[/ns][,...]
[feature[,...]]The nvmeadm
list-features command supports the following
options:
-a-H-o
field[,...]-p-o option.The following fields are supported:
The list-features command supports a
series of operands which can be used to filter the list of features that
information is printed out about. Each feature
operand is either the short name or the specification's name for a given
feature. In addition, the numeric feature ID can also be used as a
filter. If no features match a given operand or no features are printed
at all then the command will generate an error.
nvmeadm get-features
ctl[/ns][,...]
[feature-list]| FULL NAME | SHORT NAME | CONTROLLER/NAMESPACE |
| Arbitration | arb | controller |
| Power Management | pm | controller |
| LBA Range Type | range | namespace |
| Temperature Threshold | temp | controller |
| Error Recovery | errec | controller |
| Volatile Write Cache | cache | controller |
| Number of Queues | queues | controller |
| Interrupt Coalescing | coalescing | controller |
| Interrupt Vector Configuration | vector | controller |
| Write Atomicity | atomicity | controller |
| Asynchronous Event Configuration | event | controller |
| Autonomous Power State Transition | apst | controller |
| Software Progress Marker | progress | controller |
| Host Behavior Support | hostsup | controller |
For an explanation of the individual features refer to the description of the "SET FEATURES" admin command in the NVMe specification.
nvmeadm format
ctl[/ns] [lba-format]nvmeadm
detach and subsequent
nvmeadm attach of the
specified namespace(s), which will cause a changed LBA format to be
detected. If no LBA format is specified the LBA format currently used by
the namespace will be used. When formatting all namespaces without
specifying a LBA format the LBA format of namespace 1 will be used. A list
of LBA formats supported by a namespace can be queried with the
nvmeadm identify command.
Note that not all devices support formatting individual or all namespaces, or support formatting at all.
LBA formats using a non-zero metadata size are not supported
by nvmeadm or
nvme(4D).
The list of supported LBA formats on a namespace can be
retrieved with the nvmeadm
identify command.
nvmeadm secure-erase
[-c] ctl[/ns]-c will cause a cryptographic erase instead
of a normal erase. This command implies a nvmeadm
detach and nvmeadm
attach of the specified namespace(s).
Note that not all devices support erasing individual or all namespaces, or support erasing at all.
nvmeadm
create-namespace -b
block-size |
-f
flbas [-c
cap] [-n
nmic] [-t
type] ctl
sizeattach-namespace, and to the block device
framework (blkdev(4D)),
attach, to provide I/O capabilities.
By default, a newly created namespace:
-t option.-c
option to specify a value less than the size
argument. Note, the controller may not support thin provisioning.-n
option.When creating a namespace, one must specify what formatted LBA
index to use. This index may be specified directly with the
-f option or instead the target block size may
be specified with the -b option. If
-b is specified, then the command will search
for a namespace with that block size, with no metdata section, and with
the highest relative performance and use that. Available LBA format
options may be listed by printing the Common Namespace Identification
values through the identify-controller option
with the -C option.
The create-namespace command supports
the following options:
-b
block-size-f option.
block-size allow a binary prefix to be specified
as per the description of the size operand.-c
cap-f
flbas-n
nmic-t
typenvmeadm delete-namespace
ctl/nsTo delete a namespace, the namespace must already be detached
from all controllers through the
detach-namespace command.
Upon deleting a namespace, all information that was contained in the namespace will be lost.
nvmeadm attach-namespace
ctl/nsattach
command.nvmeadm detach-namespace
ctl/nsdetach command. When detached, the namespace
transitions from active to allocated in the controller. Data in the
namespace remains valid; however, not all commands will function against
the namespace and I/O may not be performed to it.nvmeadm attach
ctl[/ns]nvmeadm detach command.
It is not an error to attach a namespace that is already attached, any such request will be silently ignored.
nvmeadm detach
ctl[/ns]It is not an error to detach a namespace that is already detached, any such request will be silently ignored.
nvmeadm list-firmware
ctlnvmeadm
get-logpage ctl
firmware command.nvmeadm load-firmware
ctl firmware-file
[offset]nvmeadm commit-firmware
ctl slotload-firmware command to
slot.nvmeadm activate-firmware
ctl slotnvmeadm vendor-cmd
-O opcode
[-n nsid]
[--cdw12 cdw12]
[--cdw13 cdw13]
[--cdw14 cdw14]
[--cdw15 cdw15]
[-l length
[-i file |
-o file]]
[-L lock]
[-I
impact[,...]]
[-t timeout]
ctl[/ns]The command may be run against either a controller or a namespace. When a namespace is specified, its namespace id is included in the command.
A command may optionally request that data be sent to the
controller as an input to the command (-i), or
returned by the controller as an output from the command
(-o). There is no support in the standard
protocol for both an arbitrary sized data input and output. The length
of the input is specified by the -l flag, which
indicates a size in bytes that must be a multiple of 4 (commands operate
in units of uint32_t). Data is either read from or
output to a file. The maximum input or output data size provided by the
system is 16 MiB.
When the command completes, it will print out the results of the command and the value of the completion command dword 0.
The following arguments are supported:
-O,
--opcode opcode-n,
---nsid nsidIf no namespace ID is specified, this field will be set to 0 in the command.
--cdw12,
-2 cdw12If no value is specified, this field will be set to 0 in the command.
--cdw13,
-3 cdw13If no value is specified, this field will be set to 0 in the command.
--cdw14,
-4 cdw14If no value is specified, this field will be set to 0 in the command.
--cdw15,
-5 cdw15If no value is specified, this field will be set to 0 in the command.
-l,
--length length-i or -o must be
specified to indicate the direction of the data transfer and the
source or destination of the data.-i,
--input file-l is specified. If the input
file, file, is shorter than the length specified
with -l, then the remaining data will be
filled with 0s.-o,
--output file-l is specified.-L,
---lock lock-I,
--impact
impact[,...]-t,
--timeout timeoutnvmeadm sandisk/hwrev
ctlnvmeadm sandisk/pci-eye
-l lane
-o output
ctlnvmeadm wdc/e6dump
-o output
ctlnvmeadm wdc/resize
-s size |
-g
ctlThe following options are supported:
-g-s
sizeWhen performing a resize all data and namespace will be erased! All namespaces must be detached prior to issuing this.
nvmeadm [-dv]
wdc/clear-assert ctlwdc/e6dump command. This command should only be
used if instructed to do so as part of a troubleshooting process.nvmeadm [-dv]
wdc/inject-assert ctlThe nvmeadm utility exits 0 on
success, and >0 if an error occurs.
# nvmeadm list nvme1: model: INTEL SSDPEDMD800G4, serial: CVFT4134001R800CGN, FW rev: 8DV10049, NVMe v1.0 nvme1/1 (c1t1d0): Size = 763097 MB, Capacity = 763097 MB, Used = 763097 MB nvme4: model: SAMSUNG MZVPV128HDGM-00000, serial: S1XVNYAGA00640, FW rev: BXW7300Q, NVMe v1.1 nvme4/1 (c2t2d0): Size = 122104 MB, Capacity = 122104 MB, Used = 5127 MB
# nvmeadm identify nvme4/1
nvme4/1: Identify Namespace
Namespace Capabilities and Features
Namespace Size: 122104MB
Namespace Capacity: 122104MB
Namespace Utilization: 5127MB
Namespace Features
Thin Provisioning: unsupported
Number of LBA Formats: 1
Formatted LBA Size
LBA Format: 1
Extended Data LBA: no
Metadata Capabilities
Extended Data LBA: unsupported
Separate Metadata: unsupported
End-to-End Data Protection Capabilities
Protection Information Type 1: unsupported
Protection Information Type 2: unsupported
Protection Information Type 3: unsupported
Protection Information first: unsupported
Protection Information last: unsupported
End-to-End Data Protection Settings
Protection Information: disabled
Protection Information in Metadata: last 8 bytes
LBA Format 1
Metadata Size: 0 bytes
LBA Data Size: 512 bytes
Relative Performance: Best
# nvmeadm -v get-logpage nvme4/1 health
nvme4/1: SMART/Health Information
Critical Warnings
Available Space: OK
Temperature: OK
Device Reliability: OK
Media: OK
Volatile Memory Backup: OK
Temperature: 37C
Available Spare Capacity: 100%
Available Spare Threshold: 10%
Device Life Used: 0%
Data Read: 0GB
Data Written: 64GB
Read Commands: 52907
Write Commands: 567874
Controller Busy: 1min
Power Cycles: 6
Power On: 141h
Unsafe Shutdowns: 1
Uncorrectable Media Errors: 0
Errors Logged: 1
# nvmeadm get-features nvme0,nvme4 event,power
nvme0: Get Features
Asynchronous Event Configuration
Available Space below threshold: disabled
Temperature above threshold: disabled
Device Reliability compromised: disabled
Media read-only: disabled
Power Management
Power State: 0
nvme4: Get Features
Asynchronous Event Configuration
Available Space below threshold: disabled
Temperature above threshold: disabled
Device Reliability compromised: disabled
Media read-only: disabled
Volatile Memory Backup failed: disabled
Power Management
Power State: 0
# nvmeadm list-firmware nvme3 nvme3: Firmware Slot Information Active Firmware Slot: 4 Next Firmware Slot: 4 Firmware Revision for Slot 1: KNGND110 (read-only) Firmware Revision for Slot 2: KNGND110 Firmware Revision for Slot 3: KNGND110 Firmware Revision for Slot 4: KNGND112 Firmware Revision for Slot 5: KNGND110 # nvmeadm -v load-firmware nvme3 KNGND113.bin 1740544 bytes downloaded. # nvmeadm -v commit-firmware nvme3 5 Firmware committed to slot 5. # nvmeadm -v activate-firmware nvme3 5 Slot 5 activated: NVM subsystem reset required - power cycle your system. # nvmeadm list-firmware nvme3 nvme3: Firmware Slot Information Active Firmware Slot: 4 Next Firmware Slot: 5 Firmware Revision for Slot 1: KNGND110 (read-only) Firmware Revision for Slot 2: KNGND110 Firmware Revision for Slot 3: KNGND110 Firmware Revision for Slot 4: KNGND112 Firmware Revision for Slot 5: KNGND113
# nvmeadm list-logpages nvme8
DEVICE NAME SCOPE FIELDS DESC
nvme8 error controller rae Error information
nvme8 health controller, rae SMART / Health information
namespace
nvme8 firmware nvm -- Firmware Slot Information
nvme8 changens controller rae changed namespaces
nvme8 wdc/eol nvm -- EOL
nvme8 wdc/devmgmt controller, -- Device Manageability
namespace
nvme8 wdc/pciesi controller lsp PCIe Signal Integrity
nvme8 wdc/power controller -- Power Samples
nvme8 wdc/temp controller -- Temperature Samples
nvme8 wdc/fwact controller -- Firmware Activation
nvme8 wdc/ccds controller -- CCDS Build Information
# nvmeadm list-logpages -p -o name,impl nvme8 firmware
firmware:yes
The command line interface of nvmeadm is
Evolving.
The output of nvmeadm is
Not-an-Interface
and may change any time.
| January 30, 2026 | OmniOS |