T10-PI status for SCSI drive(SAS or SATA) and NVMe drives

If you are using SCSI drives and NVMe drives, you must verify T10-PI (protection information) status for your drive. If the T10-PI protection is enabled for your drive, performing the crypto-erase operation without verifying the protection information might make the drive unusable until you re-initialize (overwrite) the protection information.

Verifying the T10-PI status information for SCSI drives

To verify the T10-PI status for a SCSI drive, run the following command.
localhost:~ # sg_readcap -l /dev/sdg
Read Capacity results:
   Protection: prot_en=1, p_type=1, p_i_exponent=0 [type 2 protection]
   Logical block provisioning: lbpme=0, lbprz=0
   Last logical block address=2424569855 (0x9083ffff), Number of logical blocks=2424569856
   Logical block length=4096 bytes
   Logical blocks per physical block exponent=0
   Lowest aligned logical block address=0
Hence:
   Device size: 9931038130176 bytes, 9470976.0 MiB, 9931.04 GB
localhost:~ #

In the output, in the line beginning with Protection, non-zero values for prot_en or p_type indicate that protection (T10-PI) status is either formatted or active. Presence of the string at the end of the line [type 2 protection], indicates that the protection is active.

Checking the Protection status of SCSI drives must be known because a crypto-erase operation makes the drive unusable until the sectors are rewritten to force valid PI. The format operation must be called with the same protection parameters. Otherwise, the T10-PI protection is removed.

Verifying T10-PI status information for NVMe drives

You can run the nvme list command to display all namespaces. The Format column indicates the sector block size. A compound value such as 4 KiB + 8 B indicates that protection is formatted or active. The first value indicates the base block size, the second value indicates the extra space that is reserved for the protection information.
Note: There are no known issues while erasing data when the T10-PI status is active for NVMe devices. However, the erase operation removes any T10-PI unless additional format parameters are given.