Skip to main content
A newer release of this product is available.

Storage disks endpoint overview

Contributors

Retrieving storage disk information

The storage disk GET API retrieves all of the disks in the cluster.


Examples

1) Retrieve a list of disks from the cluster.

The following example shows the response with a list of disks in the cluster:


# The API:
/api/storage/disks

# The call:
curl -X GET "https://<mgmt-ip>/api/storage/disks" -H "accept: application/hal+json"

# The response:
{
"records": [
  {
    "name": "1.24.4",
    "_links": {
      "self": {
        "href": "/api/storage/disks/1.24.4"
      }
    }
  },
  {
    "name": "1.24.3",
    "_links": {
      "self": {
        "href": "/api/storage/disks/1.24.3"
      }
    }
  },
  {
    "name": "1.24.5",
    "_links": {
      "self": {
        "href": "/api/storage/disks/1.24.5"
      }
    }
  },
  {
    "name": "1.24.0",
    "_links": {
      "self": {
        "href": "/api/storage/disks/1.24.0"
      }
    }
  },
  {
    "name": "1.24.2",
    "_links": {
      "self": {
        "href": "/api/storage/disks/1.24.2"
      }
    }
  },
  {
    "name": "1.24.1",
    "_links": {
      "self": {
        "href": "/api/storage/disks/1.24.1"
      }
    }
  }
],
"num_records": 6,
"_links": {
  "self": {
    "href": "/api/storage/disks"
  }
}
}

2) Retrieve a specific disk from the cluster.

The following example shows the response of the requested disk. If there is no disk with the requested name, an error is returned:


# The API:
/api/storage/disks/{name}

# The call:
curl -X GET "https://<mgmt-ip>/api/storage/disks/1.24.3" -H "accept: application/hal+json"

# The response:
{
"name": "1.24.3",
"uid": "50000394:0808AA88:00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000",
"serial_number": "EC47PC5021SW",
"model": "X421_FAL12450A10",
"vendor": "NETAPP",
"firmware_version": "NA02",
"usable_size": 438304768000,
"rpm": 10000,
"type": "sas",
"effective_type": "sas",
"class": "performance",
"container_type": "aggregate",
"pool": "pool0",
"state": "present",
"node": {
  "uuid": "3a89ed49-8c6d-11e8-93bc-00a0985a64b6",
  "name": "node-2",
  "_links": {
    "self": {
      "href": "/api/cluster/nodes/3a89ed49-8c6d-11e8-93bc-00a0985a64b6"
    }
  }
},
"home_node": {
  "uuid": "3a89ed49-8c6d-11e8-93bc-00a0985a64b6",
  "name": "node-2",
  "_links": {
    "self": {
      "href": "/api/cluster/nodes/3a89ed49-8c6d-11e8-93bc-00a0985a64b6"
    }
  }
},
"aggregates": [
  {
    "uuid": "3fd9c345-ba91-4949-a7b1-6e2b898d74e3",
    "name": "node_2_SAS_1",
    "_links": {
      "self": {
        "href": "/api/storage/aggregates/3fd9c345-ba91-4949-a7b1-6e2b898d74e3"
      }
    }
  }
],
"shelf": {
  "uid": "10318311901725526608",
  "_links": {
    "self": {
      "href": "/api/storage/shelves/10318311901725526608"
    }
  }
},
"local": true,
"paths": [
{
   "initiator": "3a",
   "port_name": "B",
   "port_type": "sas",
   "wwnn": "5000cca02f0e6768",
   "wwpn": "5000cca02f0e676a"
 },
 {
   "initiator": "3d",
   "port_name": "A",
   "port_type": "sas",
   "wwnn": "5000cca02f0e6768",
   "wwpn": "5000cca02f0e6769"
},
{
   "initiator": "3d",
   "port_name": "A",
   "port_type": "sas",
   "wwnn": "5000cca02f0e6768",
   "wwpn": "5000cca02f0e6769"
},
{
   "initiator": "3a",
   "port_name": "B",
   "port_type": "sas",
   "wwnn": "5000cca02f0e6768",
   "wwpn": "5000cca02f0e676a"
}
],
"outage": {
  "persistently_failed": true,
  "reason": {
    "message": "Failed disk. Reason: \"admin failed\".",
    "code": "721081"
  }
},
"bay": 3,
"_links": {
  "self": {
    "href": "/api/storage/disks/1.24.3"
  }
},
"error": [
{
  "reason": {
    "message": "\"The node is configured with All-Flash Optimized personality and this disk is not an SSD. The disk needs to be removed from the system.\"",
    "code": "721082"
  },
  "type": "notallflashdisk"
}
],
"bytes_per_sector": 512,
"sector_count": 1172123568,
"stats": {
  "average_latency": 6,
  "throughput": 1957888,
  "iops_total": 12854,
  "path_error_count": 0,
  "power_on_hours": 11797
 }
}

Modifying storage disk

The storage disk PATCH API modifies disk ownership or encrypting drive authentication keys (AKs) in the cluster.

Updating the disk ownership for a specified disk

1. When the disk is not assigned

When the disk is a spare (or unowned) disk and node name is specified, the PATCH opertaion assigns the disk to the specified node.

2. When the disk is already assigned

When the disk is already assigned (aleady has a owner), and a new node is specified, the PATCH operation changes the ownership to the new node.


Examples

1. Update the disk ownership for an unowned disk


# The API:
/api/storage/disks

# The call:
curl -X PATCH "https://<mgmt-ip>/api/storage/disks/<disk-name>" -H "accept: application/hal+json" -H "Content-Type: application/hal+json" -d '{"node": {"name": "node-name"}}'

# The response:
{
}

2. Update the disk ownership for an already owned disk.


# The API:
/api/storage/disks

# The call:
curl -X PATCH "https://<mgmt-ip>/api/storage/disks/<disk-name>" -H "accept: application/hal+json" -H "Content-Type: application/hal+json" -d '{"node": {"name": "node-name"}}'

# The response:
{
}

3. Rekey the data AK of all encrypting drives to an AK selected automatically by the system.


# The API:
/api/storage/disks

# The call:
curl -X PATCH "https://<mgmt-ip>/api/storage/disks?name=*&encryption_operation=rekey_data_auto_id" -H "accept: application/hal+json" -H "Content-Type: application/hal+json"

# The response contains the number of disks attempted.
{
 "num_records": 32
}

4. Cryptographically sanitize a spare or broken disk.


# The API:
/api/storage/disks

# The call:
curl -X PATCH "https://<mgmt-ip>/api/storage/disks?name=<disk-name>&encryption_operation=sanitize_disk" -H "accept: application/hal+json" -H "Content-Type: application/hal+json"

# The response contains the number of disks attempted.
{
 "num_records": 1
}