NVMe drives

Non-Volatile Memory Express (NVMe) drives are physical storage devices or solid-state drives (SSDs) that can be installed internally in system slots or externally in a NVMe expansion drawer like the NVMe expansion drawer - 24 devices (NED24).

View NVMe drives
To view the NVMe drives (PCI devices) installed in the system, enter the following command:
# lspci -nn | grep NVMe
0172:60:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller PM173X [144d:a824]
List the drives and namespaces
To list all the drives and namespaces that start with nvme, enter the following command:
# ls -l /dev/nvme*
An example output is displayed:

crw------- 1 root root 242,   0 May 22 08:17 /dev/nvme0
brw-rw---- 1 root disk 259,   1 May 22 08:17 /dev/nvme0n1

In this output, nvme0 is a NVMe PCI device and nvme0n1 is a NVMe namespace device.

View the NVMe namespace devices
To view the NVMe namespace devices, enter the following command:
# nvme list
An example output is displayed:

Node              Generic     SN              Model                                      Namespace  Usage           Format           FW Rev
----------------- ----------- --------------- ------------------------------------------ -------------------------- ---------------- --------
/dev/nvme0n1      /dev/ng0n1  S4WANA0R400036  PCIe4 1.6TB NVMe Flash Adapter 0x1         25.01  GB /  25.01  GB     4 KiB +  0 B     REV.SP47

This example shows that only one NVMe namespace (nvme0n1) is associated with the NVMe PCI device (nvme0). If a NVMe namespace is not attached to the NVMe PCI device, then the list is empty.

Format NVMe drives
You can format a NVMe drive so that the NVMe drive is in a known state before the drive is used. To format a NVMe drive, enter the following command:
# nvme format /dev/nvme0
Attention: The nvme format command erases all the data on the drive. Take a backup of any important data on the drive before you run this command.