Wandering Thoughts archives


NVMe disk drives and SMART attributes (and data)

NVMe, also known as NVM Express, is the general standard for accessing non-volatile storage over PCIe. People commonly talk about NVMe SSDs while I sometimes call them 'NVMe drives' (see my entry on the terminology and some of the technology). By contrast you have SATA and SAS SSDs, which are a subset of SATA and SAS drives in general, because people (us included) still do use spinning rust.

SMART is a standard, originally for ATA hard drives, for reporting various information about the drive. When we talk about 'SMART' or 'SMART data', we often specifically mean SMART 'attributes', which tell you various things about the drive's state, health, wear over time, and so on; sometimes this information is even useful. SMART attributes have an ID number and some values associated with them, but what the attributes mean (and thus how you should interpret their values) is mostly vendor specific.

Whether or not NVMe SSDs have SMART attributes depends on your perspective. In the perspective of the NVMe specifications, a NVMe SSD is required to provide you with what is called 'SMART / Health Information', so maybe you could say it has SMART attributes. In practice, this information is not in the format of SMART attributes and it doesn't have the fields that they do, not even so much as an ID number. Instead, the "page" of this health information has a set of fields at specific byte offsets that have specific interpretations; for instance, the two bytes at offsets 1 and 2 contain a "composite temperature" for the NVMe SSD in Kelvins. In the current NVMe specification (version 2.0b), you can read all of the gory details in section

The practical effect of this is to leave general tools that deal with SMART data in a somewhat awkward spot when it comes to NVMe SSDs. NVMe SSDs have information that corresponds to a variety of common SMART attributes, but you can't really present the information in the same format because the information lacks a lot of things that SMART attributes have. If you tried to pretend that NVMe health data was SMART attributes, you would have to invent SMART ID numbers for all of them along with some other stuff that people often care less about. However, presenting the information in a different form means that people need new practices and processes to deal with it (including in their monitoring and metrics systems).

(I don't know why this happened, but I like to think that everyone involved in the NVMe specification took one look at the anarchic mess that SMART attributes have become and vowed to not allow anything even vaguely like it. I don't know if the NVMe specification even allows additional vendor-specific health information.)

(NVMe SSDs also provide general information about themselves that is again somewhat different than what SATA/SAS/etc drives provide through 'SMART'. For example, NVMe drives provide an OUI for who made them (see eg this listing of OUIs and who they're assigned to), while I believe that SMART provides this as a text string. The OUI is more definitive, but the text string may be easier to deal with in things like metrics systems. And cross-mapping between the two for a mix of NVMe SSDs and SATA drives is a fun problem.)

tech/NVMeAndSMART written at 22:43:57; Add Comment

Page tools: See As Normal.
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.