Skip to main content
NetApp Knowledgebase

ONTAP REST API returns wrong spare count

Views:
114
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
core
Last Updated:

Applies to

  • ONTAP 9.6
  • REST API

Issue

Curl query reports only one spare disk for node-02 instead of two and node-01 is completely missing from the output:


{
  "records": [
  ],
  "num_records": 0,
  "spares": [
    {
      "node": {
        "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "name": "node-02"
      },
      "disk_class": "capacity",
      "size": 3992785256448,
      "checksum_style": "block",
      "syncmirror_pool": "pool0",
      "usable": 1,
      "layout_requirements": [
        {
          "raid_type": "raid_dp",
          "default": true,
          "aggregate_min_disks": 5,
          "raid_group": {
            "min": 3,
            "max": 20,
            "default": 14
          }
        },
        {
          "raid_type": "raid4",
          "default": false,
          "aggregate_min_disks": 3,
          "raid_group": {
            "min": 2,
            "max": 7,
            "default": 7
          }
        },
        {
          "raid_type": "raid0",
          "default": false,
          "aggregate_min_disks": 1,
          "raid_group": {
            "min": 0,
            "max": 0,
            "default": 0
          }
        },
        {
          "raid_type": "raid_tec",
          "default": false,
          "aggregate_min_disks": 7,
          "raid_group": {
            "min": 4,
            "max": 29,
            "default": 21
          }
        }
      ]
    }
  ]
}



While aggr show-spare-disks command in ONTAP CLI reports the correct number of spares:

cluster1::> aggr show-spare-disks

Original Owner: node-01
 Pool0
  Root-Data1-Data2 Partitioned Spares
                                                              Local    Local
                                                               Data     Root Physical
 Disk             Type   Class          RPM Checksum         Usable   Usable     Size Status
 ---------------- ------ ----------- ------ -------------- -------- -------- -------- --------
 1.10.21          SSD    solid-state      - block                0B  53.88GB  894.3GB zeroed
 1.10.23          SSD    solid-state      - block           840.1GB  53.88GB  894.3GB zeroed

Original Owner: node-02
 Pool0
  Spare Pool

                                                             Usable Physical
 Disk             Type   Class          RPM Checksum           Size     Size Status
 ---------------- ------ ----------- ------ -------------- -------- -------- --------
 1.1.11           FSAS   capacity      7200 block            3.63TB   3.64TB zeroed
 1.2.11           FSAS   capacity      7200 block            3.63TB   3.64TB zeroed

Original Owner: node-02
 Pool0
  Root-Data1-Data2 Partitioned Spares
                                                              Local    Local
                                                               Data     Root Physical
 Disk             Type   Class          RPM Checksum         Usable   Usable     Size Status
 ---------------- ------ ----------- ------ -------------- -------- -------- -------- --------
 1.10.14          SSD    solid-state      - block                0B  53.88GB  894.3GB zeroed
 1.10.20          SSD    solid-state      - block                0B  53.88GB  894.3GB zeroed

 

CUSTOMER EXCLUSIVE CONTENT

Registered NetApp customers get unlimited access to our dynamic Knowledge Base.

New authoritative content is published and updated each day by our team of experts.

Current Customer or Partner?

Sign In for unlimited access

New to NetApp?

Learn more about our award-winning Support