![]() |
![]()
| ![]() |
![]()
NAME
SYNOPSIS
DESCRIPTIONNVM Express (NVMe) is a storage protocol standard, for SSDs and other high-speed storage devices over PCI Express. devlistList all NVMe controllers and namespaces along with their device
nodes. With the identifyThe identify commands reports information from the drive's
logpageThe logpage command knows how to print log pages of various types. It also knows about vendor specific log pages from hgst/wdc, samsung and intel. Note that some vendors use the same log page numbers for different data.
Specifying nsVarious namespace management commands. If namespace management is supported by device, allow list, create and delete namespaces, list, attach and detach controllers to namespaces. Each NVM device consists of one or more NVM subsystems. Each NVM subsystem has one or more NVM ports. Each NVM port is attached to one or more NVM controllers (though typically 1). Each NVM controller is attached to one or more namespaces. After a namespace is created, it is considered “allocated”. All namespaces that have not been created are unallocated. An allocated namespace may be active or inactive. An active namespace is attached to the controller and may be interacted with. A namespace can move from active to inactive when detached. An allocated namespace may be deleted to become unallocated. For more details on the nuances of NVM namespaces, please see section 2 Theory of Operation and section 3 NVM Express Architecture of the latest NVM standard. ns activeProvide a list of active namespace identifiers for the givne NVM controller. ns allocatedProvide a list of allocated namespace identifiers for the givne NVM controller. ns attachAttach an nsid to a controller. The primary controller is used if one is not specified. ns attachedProvide a list of controllers attached to a nsid. If only a nvme controller argument is provided, a nsid must also be specified. ns controllersProvide a list of all controllers in the NVM subsystem. ns createCreates a new namespace. ns deleteDelete a namespace. It must be currently inactive. ns detachDetach a namespace from a controller. The namespace will become inaccessible, but its contents will remain if it is activated again. ns identifyPrint detailed information about the namespace. nsidReports the namespace id and controller device associated with the ⟨namespace-id⟩ or ⟨device-id⟩ argument. resv acquireAcquire or preempt namespace reservation, using specified parameters: resv registerRegister, unregister or replace reservation key, using specified parameters: resv releaseRelease or clear reservation, using specified parameters: resv reportPrint reservation status, using specified parameters: formatFormat either specified namespace, or all namespaces of specified controller, using specified parameters:
When formatting specific namespace, existing values are used as defaults. When formatting all namespaces, all parameters should be specified. Some controllers may not support formatting or erasing specific or all namespaces. The nvme(4) driver does not currently support metadata and protection information transfers. sanitizeSanitize NVM subsystem of specified controller, using specified parameters:
powerManage the power modes of the NVMe controller.
selftestStart the specified device self-test: wdcThe various wdc command retrieve log data from the wdc/hgst
drives. The passthruThe “admin-passthru” and “io-passthru” commands send NVMe commands to either the administrative or the data part of the device. These commands are expected to be compatible with nvme-cli. Please see the NVM Express Base Standard for details.
Send arbitrary commands to the device. Can be used to extract
vendor specific logs. Transfers to/from the device possible, but limited to
DEVICE NAMESWhere ⟨namespace-id⟩ is required, you can use either the nvmeXnsY device, or the disk device such as ndaZ or nvdZ. The leading /dev/ may be omitted. Where ⟨device-id⟩ is required, you can use either the nvmeX device, or the disk device such as ndaZ or nvdZ. For commands that take an optional ⟨nsid⟩ you can use it to get information on other namespaces, or to query the drive itself. A ⟨nsid⟩ of “0” means query the drive itself. EXAMPLESnvmecontrol devlist Display a list of NVMe controllers and namespaces along with their device nodes. nvmecontrol identify
nvme0 nvmecontrol identify -n 0
nvd0 Display a human-readable summary of the nvme0
nvmecontrol identify -x -v
nvme0ns1 nvmecontrol identify -x -v -n 1
nvme0 Display an hexadecimal dump of the nvme0
nvmecontrol perftest -n 32 -o read -s
512 -t 30 nvme0ns1 Run a performance test on nvme0ns1 using 32 kernel threads for 30 seconds. Each thread will issue a single 512 byte read command. Results are printed to stdout when 30 seconds expires. nvmecontrol reset nvme0 nvmecontrol reset nda4 Perform a controller-level reset of the nvme0 controller. In this example, nda4 is wired to nvme0. nvmecontrol logpage -p 1
nvme0 Display a human-readable summary of the nvme0 controller's Error Information Log. Log pages defined by the NVMe specification include Error Information Log (ID=1), SMART/Health Information Log (ID=2), and Firmware Slot Log (ID=3). nvmecontrol logpage -p 0xc1 -v wdc
nvme0 Display a human-readable summary of the nvme0's wdc-specific advanced SMART data. nvmecontrol logpage -p 1 -x
nvme0 Display a hexadecimal dump of the nvme0 controller's Error Information Log. nvmecontrol logpage -p 0xcb -b nvme0
> /tmp/page-cb.bin Print the contents of vendor specific page 0xcb as binary data on standard out. Redirect it to a temporary file. nvmecontrol firmware -s 2 -f
/tmp/nvme_firmware nvme0 Download the firmware image contained in "/tmp/nvme_firmware" to slot 2 of the nvme0 controller, but do not activate the image. nvmecontrol firmware -s 4 -a
nvme0 Activate the firmware in slot 4 of the nvme0 controller on the next reset. nvmecontrol firmware -s 7 -f
/tmp/nvme_firmware -a nvme0 Download the firmware image contained in "/tmp/nvme_firmware" to slot 7 of the nvme0 controller and activate it on the next reset. nvmecontrol power -l
nvme0 List all the current power modes. nvmecontrol power -p 3
nvme0 Set the current power mode. nvmecontrol power nvme0 Get the current power mode. nvmecontrol identify -n 0
nda0 Identify the drive data associated with the nda0 device. The corresponding nvmeX devices is used automatically. nvmecontrol identify
nda0 Get the namespace parameters associated with the nda0 device. The corresponding nvmeXnsY device is used automatically. nvmecontrol format -f 2 -m 0 -p 0 -l
0 -C nvme2 Format all the name spaces on nvme2 using parameters from “LBA Format #2” with no metadata or protection data using cryptographic erase. If the “nvmecontrol identify -n 1 nvme2” command ended with LBA Format #00: Data Size: 512 Metadata Size: 0 Performance: Good LBA Format #01: Data Size: 512 Metadata Size: 8 Performance: Good LBA Format #02: Data Size: 4096 Metadata Size: 0 Performance: Good LBA Format #03: Data Size: 4096 Metadata Size: 8 Performance: Good LBA Format #04: Data Size: 4096 Metadata Size: 64 Performance: Good then this would give a 4k data format for at least namespace 1, with no metadata. DYNAMIC LOADINGThe directories /lib/nvmecontrol and /usr/local/lib/nvmecontrol are scanned for any .so files. These files are loaded. The members of the top linker set are added to the top-level commands. The members of the logpage linker set are added to the logpage parsers. SEE ALSOThe NVM Express Base Specification, https://nvmexpress.org/wp-content/uploads/NVM-Express-1_4-2019.06.10-Ratified.pdf, June 10, 2019. HISTORYThe AUTHORS
This man page was written by Jim Harris <jimharris@FreeBSD.org>.
|