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.
|
|
list
|
Lists information for the specified controller.
|
namespace
|
Lists information for the namespaces of the specified
controller.
|
getlog
|
Lists NVMe log pages of the controller. There are three log pages: SMART/Health, Error code information, and vendor-specific log information.
|
getfeature
|
Lists NVMe features of the controller.
|
format
|
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 -l or --list option.
|
erase
|
Erases the NVMe namespace media for the controller.
Note -
Stop all IO to the NVMe device before attempting this
action.
|
export
|
Exports the SSD configuration to a file. This file should not be edited or modified.
|
import
|
Imports block size and metadata size configuration from a
file.
Note -
Stop all IO to the NVMe device before attempting this
action.
|
offline
|
Take the namespace(s) of the specified controller (or all controllers) offline.
|
online
|
Bring the namespace(s) of the specified controller (or all controllers) online.
|
|
The nvmeadm command supports the options shown in the following
table.
|
|
|
|
–?
|
--help
|
All
|
Displays usage information.
|
-V
|
n/a
|
All
|
Displays version information.
|
–a
|
--all
|
format, erase, offline, online
|
Selects all namespaces on the controller.
|
–b
|
–-blocksize
|
format
|
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).
|
–e
|
–-error
|
getlog
|
Retrieves the extended error information.
|
–f
|
––format
|
format
|
Formats the NVM namespace media on the controller to the logical
block size and metadata size specified by –b,
–m, -a and –n
options.
|
-f
|
–-filename
|
export, import
|
Writes the data to or reads the data from the specified file
name.
|
–h
|
–-health
|
getlog
|
Retrieves the SMART/health information of the controller. The information is over the life of the controller and is retained across power cycles.
|
–l
|
–-list
|
format
|
Lists the LBA formats supported by the controller. Each LBA format
contains LBA size and metadata size.
|
–m
|
–-metadatasize
|
format
|
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).
|
–n
|
–-namespace
|
format, namespace, erase, offline, online
|
Selects the namespace on the controller.
|
–s
|
–-secure
|
erase
|
Securely erases all data on the controller.
This option was introduced in Oracle Solaris 11.3 SRU 18.
|
-s
|
–-vendor_specific
|
list, getlog
|
Retrieves the vendor-specific information of the specified controller. This option is used with the list and getlog subcommands.
-
When used with list, this option displays vendor information about the controller.
-
When used with getlog, this option generates nlog and eventlog files for Intel NVMe devices, and generates crash dump and memory dump files for Samsung NVMe devices. This option requires an argument that specifies the directory to which the log pages will be saved.
|
–v
|
–-verbose
|
list, namespace
|
Displays detailed information of a controller or device/namespace,
based on the invoked subcommand.
|
|