nvmeadm Command Overview
The nvmeadm
commands use the following syntax:
nvmeadm subcommand [option] [controller_name]
Note:
If a controller name is not specified for a command, the required information for all controllers is returned.
When a command fails, it returns one of several failure codes listed in nvmeadm Error Codes.
The nvmeadm
command supports the subcommands listed in the
following table.
Subcommand | Function |
---|---|
|
Lists information for the specified controller. |
|
Lists information for the namespaces of the specified controller. |
|
Lists NVMe log pages of the controller. There are three log pages: SMART/Health, Error code information, and vendor-specific log information. |
|
Lists NVMe features of the controller. |
|
Low-level formats specified namespaces, which changes the LBA (Logical Block Address) and metadata size for the controller. All data is destroyed after a low level format. Note: Stop all IO to the NVMe device before attempting to format
it. This is not necessary if you are simply obtaining format details
using the format |
|
Erases the NVMe namespace media for the controller. Note: Stop all IO to the NVMe device before attempting this action. |
|
Exports the SSD configuration to a file. This file should not be edited or modified. |
|
Imports block size and metadata size configuration from a file. Note: Stop all IO to the NVMe device before attempting this action. |
|
Take the namespace(s) of the specified controller (or all controllers) offline. |
|
Bring the namespace(s) of the specified controller (or all controllers) online. |
The nvmeadm
command supports the options shown in the following
table.
Short Option | Long Option | Subcommands Used With | Description |
---|---|---|---|
|
|
All |
Displays usage information. |
|
n/a |
All |
Displays version information. |
|
|
|
Selects all namespaces on the controller. |
|
|
|
Specifies the LBA data size of a namespace on the controller. This option requires an argument for blocksize. Supported block sizes depend on the controller (see List the Supported LBA Format). |
|
|
|
Retrieves the extended error information. |
|
|
|
Formats the NVM namespace media on the controller to the logical
block size and metadata size specified by |
|
|
|
Writes the data to or reads the data from the specified file name. |
|
|
|
Retrieves the SMART/health information of the controller. The information is over the life of the controller and is retained across power cycles. |
|
|
|
Lists the LBA formats supported by the controller. Each LBA format contains LBA size and metadata size. |
|
|
|
Specifies the metadata size of a namespace on the controller. This option requires an argument for metadata size. Supported metadata sizes depend on the supported block sizes (see List the Supported LBA Format). |
|
|
|
Selects the namespace on the controller. |
|
|
|
Securely erases all data on the controller. |
|
|
|
Retrieves the vendor-specific information of the specified
controller. This option is used with the
|
|
|
|
Displays detailed information of a controller or device/namespace, based on the invoked subcommand. |
Parent topic: Using nvmeadm to Configure an NVM Express Device