C-program to Write LBAs of an NVMe Storage Drive

Here we will see how to write LBAs of an NVMe drive. I will be explaining it for Ubuntu 16.04 enviornment. As we are using the NVMe driver of linux. For writing onto an NVMe drive we have to prepare the requisite fields of the nvme_passthru_cmd structure and then call IOCTL for the NVMe device … Continue reading C-program to Write LBAs of an NVMe Storage Drive

Advertisements

C-program to send Identify-Namespace command to an NVMe storage drive

In this blog, we will send an Identify command to fetch the Identify-Namespace data. The code explained here, is written for Ubuntu 16.04. Every NVMe drive has to support an Identify command. In the case of SATA 512 bytes of data is returned upon running of Identify command - it identifies the storage drive as … Continue reading C-program to send Identify-Namespace command to an NVMe storage drive

C-program to send Identify-Controller command to an NVMe Storage Drive

Here in this blog, we will learn to send Identify Controller command to an NVMe drive. I have used Ubuntu 16.04 and drivers in there for sending the command. We will also try to interpret some of the basic fields in the data returned by the command. Identify-controller command gives us following information about an … Continue reading C-program to send Identify-Controller command to an NVMe Storage Drive

C Program to read and interpret SMART log of an NVMe Drive

Just like SATA drives, NVMe drives also provide the SMART log data. SMART log, if you people do not know, is the concentration of all the logs a drive maintains. It stands for "Self-Monitoring, Analysis, and Reporting Technology". It gives us the information like Temperature of the drive, Host Data written, Available Spare Space and … Continue reading C Program to read and interpret SMART log of an NVMe Drive