Determining NVMe drives

To determine whether Non-Volatile Memory Express (NVMe) drives are present and whether it supports crypto-erase operation, run the following steps:
  • The nvme-cli package is required to erase data in the NVMe drives. To list the NVMe drives (namespaces) that are present run the nvme list command.
    localhost:~ # nvme list
    Node             SN                   Model                                    Namespace
     Usage                      Format           FW Rev  
    ---------------- -------------------- ---------------------------------------- ---------
     -------------------------- ---------------- --------
    /dev/nvme0n1     S3RVNA0J300208       PCIe3 1.6TB NVMe Flash Adapter II x8     1        
       1.56  TB /   1.56  TB      4 KiB +  8 B   MN14MN14
    localhost:~ #
    

    In the output, you can see one NVMe drive namespace. The drive controller is /dev/nvme0 and the namespace is /dev/nvme0n1.

  • To determine whether the controller supports crypto-erase operation, run the following command:
    localhost:~ # nvme id-ctrl /dev/nvme0 | grep fna
    fna       : 0x4
    localhost:~ #
    
    The presence of the 0x4 bit in the fna field indicates that the crypto-erase operation is supported.
    Note: The fna field is a bit-map, so if the binary value of fna field has the bit 22 set to 1, then crypto-erase is supported. The value of the fna field might not be 0x4 always.