Main index | Section 8 | Options |
| |
The namespace <nsid> to use instead of the namespace associated with the device. A nsid of "0" is used to retrieve the IDENTIFY_CONTROLLER data associated with that drive. | |
Page 0x01 | Drive Error Log |
Page 0x02 | Health/SMART Data |
Page 0x03 | Firmware Information |
Page 0x04 | Changed Namespace List |
Page 0x05 | Commands Supported and Effects |
Page 0x06 | Device Self-test |
Page 0x80 | Reservation Notification |
Page 0x81 | Sanitize Status |
Page 0xc1 | Advanced SMART information (WDC/HGST) |
Page 0xc1 | Read latency stats (Intel) |
Page 0xc2 | Wite latency stats (Intel) |
Page 0xc5 | Temperature stats (Intel) |
Page 0xca | Advanced SMART information (Intel) |
Specifying
| |
Acquire action: | |
0 | Acquire |
1 | Preempt |
2 | Preempt and abort |
| Current reservation key. |
| Preempt reservation key. |
| Reservation type: |
1 | Write Exclusive |
2 | Exclusive Access |
3 | Write Exclusive - Registrants Only |
4 | Exclusive Access - Registrants Only |
5 | Write Exclusive - All Registrants |
6 | Exclusive Access - All Registrants |
| |
Current reservation key. | |
| |
New reservation key. | |
| |
Register action: | |
0 | Register |
1 | Unregister |
2 | Replace |
| Ignore Existing Key |
| Change Persist Through Power Loss State: |
0 | No change to PTPL state |
2 | Set PTPL state to â0â. Reservations are released and registrants are cleared on a power on. |
3 | Set PTPL state to â1â. Reservations and registrants persist across a power loss. |
| |
Current reservation key. | |
| |
Reservation type. | |
| |
Release action: | |
0 | Release |
1 | Clean |
| |
Print reservation status in hex. | |
| |
Use Extended Data Structure. | |
| |
Specify the sanitize operation to perform. | |
overwrite | |
Perform an overwrite operation by writing a user supplied
data pattern to the device one or more times.
The pattern is given by the
| |
block | Perform a block erase operation. All the device's blocks are set to a vendor defined value, typically zero. |
crypto | |
Perform a cryptographic erase operation. The encryption keys are changed to prevent the decryption of the data. | |
exitfailure | |
Exits a previously failed sanitize operation.
A failed sanitize operation can only be exited if it was
run in the unrestricted completion mode, as provided by the
| |
| |
The number of passes when performing an 'overwrite' operation. Valid values are between 1 and 16. The default is 1. | |
| |
No Deallocate After Sanitize. | |
| |
When performing an 'overwrite' operation, the pattern is inverted between consecutive passes. | |
| |
32 bits of pattern to use when performing an 'overwrite' operation. The pattern is repeated as needed to fill each block. | |
| |
Perform the sanitize in the unrestricted completion mode. If the operation fails, it can later be exited with the 'exitfailure' operation. | |
| |
Run in "report only" mode. This will report status on a sanitize that is already running on the drive. | |
| |
List all supported power modes. | |
| |
Set the power mode to
mode.
This must be a mode listed with the
nvmecontrol power -l command. | |
| |
Set the workload hint for automatic power mode control. | |
0 | No workload hint is provided. |
1 | Extended idle period workload. The device is often idle for minutes at a time. A burst of write commands comes in over a period of seconds. Then the device returns to being idle. |
2 | Heavy sequential writes. A huge number of sequential writes will be submitted, filling the submission queues. |
Other | All other values are reserved and have no standard meaning. |
| |
Specify the device self-test command code. Common codes are: | |
0x1 | Start a short device self-test operation |
0x2 | Start an extended device self-test operation |
0xe | Start a vendor specific device self-test operation |
0xf | Abort the device self-test operation |
| |
Opcode to send. | |
| |
32-bit value for CDW2. | |
| |
32-bit value for CDW3. | |
| |
32-bit value for CDW10. | |
| |
32-bit value for CDW11. | |
| |
32-bit value for CDW12. | |
| |
32-bit value for CDW13. | |
| |
32-bit value for CDW14. | |
| |
32-bit value for CDW15. | |
| |
Length of the data for I/O (bytes). | |
| |
Length of the metadata segment for command (bytes). This is ignored and not implemented in nvme(4). | |
| |
Nvme command flags. | |
| |
Namespace ID for command (Ignored). | |
| |
Value to prefill payload with. | |
| |
Output in binary format (otherwise a hex dump is produced). | |
| |
Do not actually execute the command, but perform sanity checks on it. | |
| |
Command reads data from the device. | |
| |
Show all the command values on stdout. | |
| |
Command writes data to the device. | |
nvmecontrol 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 IDENTIFY_CONTROLLER data. In this example, nvd0 is connected to nvme0.
nvmecontrol identify -x -v nvme0ns1
nvmecontrol identify -x -v -n 1 nvme0
Display an hexadecimal dump of the nvme0 IDENTIFY_NAMESPACE data for namespace 1.
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.
The NVM Express Base Specification, June 10, 2019.
This man page was written by Jim Harris <Mt jimharris@FreeBSD.org>.
NVMECONTROL (8) | December 19, 2020 |
Main index | Section 8 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | UNIX has been evolving feverishly for close to 30 years, sort of like bacteria in a cesspool — only not as attractive | ” |
— John Levine, "Unix for Dummies" |