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

Retrieve LUNs

Contributors

GET /storage/luns

Introduced In: 9.6

Retrieves LUNs.

Expensive properties

There is an added computational cost to retrieving values for these properties. They are not included by default in GET results and must be explicitly requested using the fields query parameter. See Requesting specific fields to learn more.

  • attributes.*

  • auto_delete

  • copy.*

  • lun_maps.*

  • movement.*

  • statistics.*

  • vvol.bindings.*

  • metric.*

  • lun bind show

  • lun copy show

  • lun mapping show

  • lun move show

  • lun show

  • volume file clone show-autodelete

Learn more

Parameters

Name Type In Required Description

location.qtree.id

integer

query

False

Filter by location.qtree.id

  • Max value: 4994

  • Min value: 0

location.qtree.name

string

query

False

Filter by location.qtree.name

location.node.uuid

string

query

False

Filter by location.node.uuid

  • Introduced in: 9.10

location.node.name

string

query

False

Filter by location.node.name

  • Introduced in: 9.10

location.logical_unit

string

query

False

Filter by location.logical_unit

location.volume.uuid

string

query

False

Filter by location.volume.uuid

location.volume.name

string

query

False

Filter by location.volume.name

movement.max_throughput

integer

query

False

Filter by movement.max_throughput

movement.paths.destination

string

query

False

Filter by movement.paths.destination

movement.paths.source

string

query

False

Filter by movement.paths.source

movement.progress.failure.arguments.message

string

query

False

Filter by movement.progress.failure.arguments.message

movement.progress.failure.arguments.code

string

query

False

Filter by movement.progress.failure.arguments.code

movement.progress.failure.message

string

query

False

Filter by movement.progress.failure.message

movement.progress.failure.code

string

query

False

Filter by movement.progress.failure.code

movement.progress.failure.target

string

query

False

Filter by movement.progress.failure.target

movement.progress.state

string

query

False

Filter by movement.progress.state

movement.progress.volume_snapshot_blocked

boolean

query

False

Filter by movement.progress.volume_snapshot_blocked

movement.progress.elapsed

integer

query

False

Filter by movement.progress.elapsed

movement.progress.percent_complete

integer

query

False

Filter by movement.progress.percent_complete

  • Max value: 100

  • Min value: 0

lun_maps.igroup.uuid

string

query

False

Filter by lun_maps.igroup.uuid

lun_maps.igroup.name

string

query

False

Filter by lun_maps.igroup.name

lun_maps.logical_unit_number

integer

query

False

Filter by lun_maps.logical_unit_number

os_type

string

query

False

Filter by os_type

attributes.value

string

query

False

Filter by attributes.value

  • Introduced in: 9.10

  • maxLength: 4091

  • minLength: 1

attributes.name

string

query

False

Filter by attributes.name

  • Introduced in: 9.10

  • maxLength: 4091

  • minLength: 1

create_time

string

query

False

Filter by create_time

  • Introduced in: 9.7

uuid

string

query

False

Filter by uuid

name

string

query

False

Filter by name

auto_delete

boolean

query

False

Filter by auto_delete

class

string

query

False

Filter by class

enabled

boolean

query

False

Filter by enabled

qos_policy.uuid

string

query

False

Filter by qos_policy.uuid

qos_policy.name

string

query

False

Filter by qos_policy.name

status.read_only

boolean

query

False

Filter by status.read_only

status.container_state

string

query

False

Filter by status.container_state

status.mapped

boolean

query

False

Filter by status.mapped

status.state

string

query

False

Filter by status.state

space.scsi_thin_provisioning_support_enabled

boolean

query

False

Filter by space.scsi_thin_provisioning_support_enabled

  • Introduced in: 9.10

space.size

integer

query

False

Filter by space.size

  • Max value: 140737488355328

  • Min value: 4096

space.guarantee.requested

boolean

query

False

Filter by space.guarantee.requested

space.guarantee.reserved

boolean

query

False

Filter by space.guarantee.reserved

space.used

integer

query

False

Filter by space.used

copy.source.progress.percent_complete

integer

query

False

Filter by copy.source.progress.percent_complete

  • Max value: 100

  • Min value: 0

  • Introduced in: 9.10

copy.source.progress.elapsed

integer

query

False

Filter by copy.source.progress.elapsed

  • Introduced in: 9.10

copy.source.progress.volume_snapshot_blocked

boolean

query

False

Filter by copy.source.progress.volume_snapshot_blocked

  • Introduced in: 9.10

copy.source.progress.failure.arguments.message

string

query

False

Filter by copy.source.progress.failure.arguments.message

  • Introduced in: 9.10

copy.source.progress.failure.arguments.code

string

query

False

Filter by copy.source.progress.failure.arguments.code

  • Introduced in: 9.10

copy.source.progress.failure.message

string

query

False

Filter by copy.source.progress.failure.message

  • Introduced in: 9.10

copy.source.progress.failure.code

string

query

False

Filter by copy.source.progress.failure.code

  • Introduced in: 9.10

copy.source.progress.failure.target

string

query

False

Filter by copy.source.progress.failure.target

  • Introduced in: 9.10

copy.source.progress.state

string

query

False

Filter by copy.source.progress.state

  • Introduced in: 9.10

copy.source.uuid

string

query

False

Filter by copy.source.uuid

  • Introduced in: 9.10

copy.source.max_throughput

integer

query

False

Filter by copy.source.max_throughput

  • Introduced in: 9.10

copy.source.name

string

query

False

Filter by copy.source.name

  • Introduced in: 9.10

copy.destinations.uuid

string

query

False

Filter by copy.destinations.uuid

  • Introduced in: 9.10

copy.destinations.name

string

query

False

Filter by copy.destinations.name

  • Introduced in: 9.10

copy.destinations.max_throughput

integer

query

False

Filter by copy.destinations.max_throughput

  • Introduced in: 9.10

copy.destinations.progress.elapsed

integer

query

False

Filter by copy.destinations.progress.elapsed

  • Introduced in: 9.10

copy.destinations.progress.percent_complete

integer

query

False

Filter by copy.destinations.progress.percent_complete

  • Max value: 100

  • Min value: 0

  • Introduced in: 9.10

copy.destinations.progress.state

string

query

False

Filter by copy.destinations.progress.state

  • Introduced in: 9.10

copy.destinations.progress.failure.arguments.message

string

query

False

Filter by copy.destinations.progress.failure.arguments.message

  • Introduced in: 9.10

copy.destinations.progress.failure.arguments.code

string

query

False

Filter by copy.destinations.progress.failure.arguments.code

  • Introduced in: 9.10

copy.destinations.progress.failure.message

string

query

False

Filter by copy.destinations.progress.failure.message

  • Introduced in: 9.10

copy.destinations.progress.failure.code

string

query

False

Filter by copy.destinations.progress.failure.code

  • Introduced in: 9.10

copy.destinations.progress.failure.target

string

query

False

Filter by copy.destinations.progress.failure.target

  • Introduced in: 9.10

copy.destinations.progress.volume_snapshot_blocked

boolean

query

False

Filter by copy.destinations.progress.volume_snapshot_blocked

  • Introduced in: 9.10

svm.uuid

string

query

False

Filter by svm.uuid

svm.name

string

query

False

Filter by svm.name

metric.timestamp

string

query

False

Filter by metric.timestamp

  • Introduced in: 9.7

metric.status

string

query

False

Filter by metric.status

  • Introduced in: 9.7

metric.throughput.read

integer

query

False

Filter by metric.throughput.read

  • Introduced in: 9.7

metric.throughput.other

integer

query

False

Filter by metric.throughput.other

  • Introduced in: 9.7

metric.throughput.write

integer

query

False

Filter by metric.throughput.write

  • Introduced in: 9.7

metric.throughput.total

integer

query

False

Filter by metric.throughput.total

  • Introduced in: 9.7

metric.duration

string

query

False

Filter by metric.duration

  • Introduced in: 9.7

metric.latency.read

integer

query

False

Filter by metric.latency.read

  • Introduced in: 9.7

metric.latency.other

integer

query

False

Filter by metric.latency.other

  • Introduced in: 9.7

metric.latency.write

integer

query

False

Filter by metric.latency.write

  • Introduced in: 9.7

metric.latency.total

integer

query

False

Filter by metric.latency.total

  • Introduced in: 9.7

metric.iops.read

integer

query

False

Filter by metric.iops.read

  • Introduced in: 9.7

metric.iops.other

integer

query

False

Filter by metric.iops.other

  • Introduced in: 9.7

metric.iops.write

integer

query

False

Filter by metric.iops.write

  • Introduced in: 9.7

metric.iops.total

integer

query

False

Filter by metric.iops.total

  • Introduced in: 9.7

comment

string

query

False

Filter by comment

  • maxLength: 254

  • minLength: 0

consistency_group.name

string

query

False

Filter by consistency_group.name

  • Introduced in: 9.10

consistency_group.uuid

string

query

False

Filter by consistency_group.uuid

  • Introduced in: 9.10

serial_number

string

query

False

Filter by serial_number

  • maxLength: 12

  • minLength: 12

statistics.latency_raw.read

integer

query

False

Filter by statistics.latency_raw.read

  • Introduced in: 9.7

statistics.latency_raw.other

integer

query

False

Filter by statistics.latency_raw.other

  • Introduced in: 9.7

statistics.latency_raw.write

integer

query

False

Filter by statistics.latency_raw.write

  • Introduced in: 9.7

statistics.latency_raw.total

integer

query

False

Filter by statistics.latency_raw.total

  • Introduced in: 9.7

statistics.iops_raw.read

integer

query

False

Filter by statistics.iops_raw.read

  • Introduced in: 9.7

statistics.iops_raw.other

integer

query

False

Filter by statistics.iops_raw.other

  • Introduced in: 9.7

statistics.iops_raw.write

integer

query

False

Filter by statistics.iops_raw.write

  • Introduced in: 9.7

statistics.iops_raw.total

integer

query

False

Filter by statistics.iops_raw.total

  • Introduced in: 9.7

statistics.timestamp

string

query

False

Filter by statistics.timestamp

  • Introduced in: 9.7

statistics.status

string

query

False

Filter by statistics.status

  • Introduced in: 9.7

statistics.throughput_raw.read

integer

query

False

Filter by statistics.throughput_raw.read

  • Introduced in: 9.7

statistics.throughput_raw.other

integer

query

False

Filter by statistics.throughput_raw.other

  • Introduced in: 9.7

statistics.throughput_raw.write

integer

query

False

Filter by statistics.throughput_raw.write

  • Introduced in: 9.7

statistics.throughput_raw.total

integer

query

False

Filter by statistics.throughput_raw.total

  • Introduced in: 9.7

vvol.is_bound

boolean

query

False

Filter by vvol.is_bound

  • Introduced in: 9.10

vvol.bindings.partner.uuid

string

query

False

Filter by vvol.bindings.partner.uuid

  • Introduced in: 9.10

vvol.bindings.partner.name

string

query

False

Filter by vvol.bindings.partner.name

  • Introduced in: 9.10

vvol.bindings.secondary_id

string

query

False

Filter by vvol.bindings.secondary_id

  • Introduced in: 9.13

vvol.bindings.id

integer

query

False

Filter by vvol.bindings.id

  • Introduced in: 9.10

fields

array[string]

query

False

Specify the fields to return.

max_records

integer

query

False

Limit the number of records returned.

return_records

boolean

query

False

The default is true for GET calls. When set to false, only the number of records is returned.

  • Default value: 1

return_timeout

integer

query

False

The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.

  • Max value: 120

  • Min value: 0

  • Default value: 1

order_by

array[string]

query

False

Order results by specified fields and optional [asc

Response

Status: 200, Ok
Name Type Description

_links

_links

num_records

integer

The number of records in the response.

records

array[lun]

Example response
{
  "_links": {
    "next": {
      "href": "/api/resourcelink"
    },
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "num_records": 1,
  "records": [
    {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "attributes": [
        {
          "_links": {
            "self": {
              "href": "/api/resourcelink"
            }
          },
          "name": "name1",
          "value": "value1"
        }
      ],
      "class": "string",
      "clone": {
        "source": {
          "name": "/vol/volume1/lun1",
          "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
        }
      },
      "comment": "string",
      "consistency_group": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "cg1",
        "uuid": "4abc2317-4332-9d37-93a0-20bd29c22df0"
      },
      "convert": {
        "namespace": {
          "name": "/vol/volume1/namespace1",
          "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
        }
      },
      "copy": {
        "destinations": [
          {
            "_links": {
              "self": {
                "href": "/api/resourcelink"
              }
            },
            "max_throughput": 0,
            "name": "/vol/vol1/lun1",
            "progress": {
              "elapsed": 0,
              "failure": {
                "arguments": [
                  {
                    "code": "string",
                    "message": "string"
                  }
                ],
                "code": "4",
                "message": "entry doesn't exist",
                "target": "uuid"
              },
              "percent_complete": 0,
              "state": "string"
            },
            "uuid": "1bc327d5-4654-5284-a116-f182282240b4"
          }
        ],
        "source": {
          "_links": {
            "self": {
              "href": "/api/resourcelink"
            }
          },
          "name": "/vol/vol2/lun1",
          "progress": {
            "elapsed": 0,
            "failure": {
              "arguments": [
                {
                  "code": "string",
                  "message": "string"
                }
              ],
              "code": "4",
              "message": "entry doesn't exist",
              "target": "uuid"
            },
            "percent_complete": 0,
            "state": "string"
          },
          "uuid": "03c05019-40d9-3945-c767-dca4c3be5e90"
        }
      },
      "create_time": "2018-06-04 15:00:00 -0400",
      "location": {
        "logical_unit": "lun1",
        "node": {
          "_links": {
            "self": {
              "href": "/api/resourcelink"
            }
          },
          "name": "node1",
          "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
        },
        "qtree": {
          "_links": {
            "self": {
              "href": "/api/resourcelink"
            }
          },
          "id": 1,
          "name": "qt1"
        },
        "volume": {
          "_links": {
            "self": {
              "href": "/api/resourcelink"
            }
          },
          "name": "volume1",
          "uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
        }
      },
      "lun_maps": [
        {
          "_links": {
            "self": {
              "href": "/api/resourcelink"
            }
          },
          "igroup": {
            "_links": {
              "self": {
                "href": "/api/resourcelink"
              }
            },
            "name": "igroup1",
            "uuid": "4ea7a442-86d1-11e0-ae1c-123478563412"
          },
          "logical_unit_number": 0
        }
      ],
      "metric": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "duration": "PT15S",
        "iops": {
          "read": 200,
          "total": 1000,
          "write": 100
        },
        "latency": {
          "read": 200,
          "total": 1000,
          "write": 100
        },
        "status": "ok",
        "throughput": {
          "read": 200,
          "total": 1000,
          "write": 100
        },
        "timestamp": "2017-01-25 06:20:13 -0500"
      },
      "movement": {
        "paths": {
          "destination": "/vol/vol1/lun1",
          "source": "/vol/vol2/lun2"
        },
        "progress": {
          "elapsed": 0,
          "failure": {
            "arguments": [
              {
                "code": "string",
                "message": "string"
              }
            ],
            "code": "4",
            "message": "entry doesn't exist",
            "target": "uuid"
          },
          "percent_complete": 0,
          "state": "string"
        }
      },
      "name": "/vol/volume1/qtree1/lun1",
      "os_type": "string",
      "qos_policy": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "qos1",
        "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
      },
      "serial_number": "string",
      "space": {
        "size": 1073741824,
        "used": 0
      },
      "statistics": {
        "iops_raw": {
          "read": 200,
          "total": 1000,
          "write": 100
        },
        "latency_raw": {
          "read": 200,
          "total": 1000,
          "write": 100
        },
        "status": "ok",
        "throughput_raw": {
          "read": 200,
          "total": 1000,
          "write": 100
        },
        "timestamp": "2017-01-25 06:20:13 -0500"
      },
      "status": {
        "container_state": "string",
        "state": "online"
      },
      "svm": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "svm1",
        "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
      },
      "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412",
      "vvol": {
        "bindings": [
          {
            "_links": {
              "self": {
                "href": "/api/resourcelink"
              }
            },
            "id": 1,
            "partner": {
              "_links": {
                "self": {
                  "href": "/api/resourcelink"
                }
              },
              "name": "/vol/vol1/lun1",
              "uuid": "4ea7a442-86d1-11e0-ae1c-123478563412"
            },
            "secondary_id": "0000D20000010000h"
          }
        ]
      }
    }
  ]
}

Error

Status: Default, Error
Name Type Description

error

error

Example error
{
  "error": {
    "arguments": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  }
}

Definitions

See Definitions

href

Name Type Description

href

string

Name Type Description

next

href

self

href

Name Type Description

self

href

attributes

A name/value pair optionally stored with the LUN. Attributes are available to callers to persist small amounts of application-specific metadata. They are in no way interpreted by ONTAP.

Attribute names and values must be at least one byte and no more than 4091 bytes in length. The sum of the name and value lengths must be no more than 4092 bytes.

Optional in POST.

Name Type Description

_links

_links

name

string

The attribute name.

value

string

The attribute value.

source

The source LUN for a LUN clone operation. This can be specified using property clone.source.uuid or clone.source.name. If both properties are supplied, they must refer to the same LUN.

Valid in POST to create a new LUN as a clone of the source.

Valid in PATCH to overwrite an existing LUN's data as a clone of another.

Name Type Description

name

string

The fully qualified path name of the clone source LUN composed of a "/vol" prefix, the volume name, the (optional) qtree name, and base name of the LUN. Valid in POST and PATCH.

uuid

string

The unique identifier of the clone source LUN. Valid in POST and PATCH.

clone

This sub-object is used in POST to create a new LUN as a clone of an existing LUN, or PATCH to overwrite an existing LUN as a clone of another. Setting a property in this sub-object indicates that a LUN clone is desired. Consider the following other properties when cloning a LUN: auto_delete, qos_policy, space.guarantee.requested and space.scsi_thin_provisioning_support_enabled.

When used in a PATCH, the patched LUN's data is over-written as a clone of the source and the following properties are preserved from the patched LUN unless otherwise specified as part of the PATCH: class, auto_delete, lun_maps, serial_number, status.state, and uuid.

Persistent reservations for the patched LUN are also preserved.

Name Type Description

source

source

The source LUN for a LUN clone operation. This can be specified using property clone.source.uuid or clone.source.name. If both properties are supplied, they must refer to the same LUN.

Valid in POST to create a new LUN as a clone of the source.

Valid in PATCH to overwrite an existing LUN's data as a clone of another.

consistency_group

The LUN's consistency group. This property is populated for LUNs whose volume is a member of a consistency group. If the volume is a member of a child consistency group, the parent consistency group is reported.

Name Type Description

_links

_links

name

string

The name of the consistency group.

uuid

string

The unique identifier of the consistency group.

namespace

The source namespace for convert operation. This can be specified using property convert.namespace.uuid or convert.namespace.name. If both properties are supplied, they must refer to the same NVMe namespace.

Valid in POST. A convert request from NVMe namespace to LUN cannot be combined with setting any other LUN properties. All other properties of the converted LUN comes from the source NVMe namespace.

Name Type Description

name

string

The fully qualified path name of the source NVMe namespace composed of a "/vol" prefix, the volume name, the (optional) qtree name and base name of the NVMe namespace. Valid in POST.

uuid

string

The unique identifier of the source NVMe namespace. Valid in POST.

convert

This sub-object is used in POST to convert a valid in-place NVMe namespace to a LUN. Setting a property in this sub-object indicates that a conversion from the specified NVMe namespace to LUN is desired.

Name Type Description

namespace

namespace

The source namespace for convert operation. This can be specified using property convert.namespace.uuid or convert.namespace.name. If both properties are supplied, they must refer to the same NVMe namespace.

Valid in POST. A convert request from NVMe namespace to LUN cannot be combined with setting any other LUN properties. All other properties of the converted LUN comes from the source NVMe namespace.

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

error

Error information provided if the asynchronous LUN copy operation fails.

Name Type Description

arguments

array[error_arguments]

Message arguments

code

string

Error code

message

string

Error message

target

string

The target parameter that caused the error.

progress

Properties related to the progress of an active or recently completed LUN copy.

Name Type Description

elapsed

integer

The amount of time that has elapsed since the start of the LUN copy, in seconds.

failure

error

Error information provided if the asynchronous LUN copy operation fails.

percent_complete

integer

The percentage completed of the LUN copy.

state

string

The state of the LUN copy.