5

Monitor wear level of NetApp E-Series flash drives via the API and from the CLI

 1 year ago
source link: https://scaleoutsean.github.io/2023/01/08/eseries-flash-ssd-wear-level-monitoring.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Monitor wear level of NetApp E-Series flash drives via the API and from the CLI

08 Jan 2023 -

1 minute read

In one of the recent 11.70 releases of SANtricity OS (it doesn’t say which one) E-Series Engineering added SSD wear metrics to the API.

Recently I made a short post on where to find the indicator in the SANtricity Web UI.

This post is about getting the information via the API or CLI.

Using the CLI you’d do this:

show allDrives driveMediaType=SSD currentSsdWearLifeStats;

The CLI might return many entries like this one as a result:

CURRENT SSD WEAR LIFE STATISTICS FOR STORAGE ARRAY: EF280
   Collection timestamp:                           12/19/22 9:14:59 AM CST
   DRIVES------------------------------                          

      Drive at Tray 99, Slot 2

         World-wide name:                          58:ce:38:ee:20:4e:e3:69:00:00:00:00:00:00:00:00
         Serial number:                            78V0A006Z004
         Available LBA mapping resource count:     1976356033800
         Used LBA mapping resource count:          7494916962944
         Percent available provisioning resource:  20%
         Host write block count:                   589774108171
         Total NAND write blocks count:            19853141880064
         Power on hours:                           35540
         Percent endurance used:                   22%                                             
         Percent endurance remaining:              78%
      ...

Using the API, query physical drives:

curl -X GET "https://${API_IP}:8443/devmgr/v2/storage-systems/${WWN}/drives"
     -H  "accept: application/json"

You’ll get a big JSON response in return.

Here I’ll copy just the relevant section from one of the drives.

{
"ssdWearLife": {
    "averageEraseCountPercent":4,
    "spareBlocksRemainingPercent":100,
    "isWearLifeMonitoringSupported":true,
    "percentEnduranceUsed":4},
"driveMediaType":"ssd"
}

This one has clearly been only lighly used.

As “isWearLifeMonitoringSupported” indicates, not all disk drives support this (only SSD and NVMe drives can have these metrics).

These metrics could be added to E-Series Performance Analyzer or your own script or monitoring solution.

A simple way to do something with it without writing complicated scripts could be to get wear level figures, find the highest value figure and alert if it’s over 50 (50%), for example.

echo $response | jq  '.[].ssdWearLife? | .percentEnduranceUsed'

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK