Skip to main content
REST API reference

Modify an ONTAP LUN map

PATCH /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}

Introduced In: 9.19

Modifies a LUN map.

  • lun mapping modify

Parameters

Name Type In Required Description

lun.uuid

string

path

True

The unique identifier of the LUN.

igroup.uuid

string

path

True

The unique identifier of the igroup.

Request Body

Name Type Description

igroup

igroup

The initiator group to which the LUN is mapped. Required in POST by supplying either the igroup.uuid, igroup.name, or both.

lun

lun

The LUN to which the initiator group is mapped. Required in POST by supplying either the lun.uuid, lun.name, or both.

replicated

boolean

The replicated property only applies when the initiator group is replicated and the mapped LUN is a member of a SnapMirror Synchronous relationship. When these conditions are met, replicated defaults to true, and maps are replicated. The replicated property can be PATCHed to false to disable this replication for a LUN map. When set to false, the LUN map on the remote cluster is deleted. When set to true, the LUN map on the remote cluster is created. This property is closely related to the local_delete_only query parameter that can be used during DELETE. The properties achieve the same result, with the difference being the cluster where the map is deleted. PATCH the replicated property to false to keep the local map and delete the remote map. DELETE with local_delete_only set to true to delete the local map and keep the remote map.

reporting_nodes

array[reporting_nodes]

The cluster nodes from which network paths to the mapped LUNs are advertised via the SAN protocols as part of the Selective LUN Map (SLM) feature of ONTAP.

When a LUN map is created, the cluster node hosting the LUN and its high availability (HA) partner are set as the default reporting node. In POST, the property additional_reporting_node may be used to add an additional node and its HA partner.

  • readOnly: 1

  • Introduced in: 9.10

Example request
{
  "igroup": {
    "initiators": [
      "iqn.1998-01.com.corp.iscsi:name1"
    ],
    "os_type": "string",
    "protocol": "string"
  },
  "lun": {
    "node": {
      "name": "node1",
      "uuid": "1cf8aa42-8cd1-12e0-a11c-423468563412"
    }
  }
}

Response

Status: 200, Ok

Error

Status: Default

ONTAP Error Response Codes

Error Code Description

5374875

The specified LUN does not exist or is not accessible to the caller.

5374878

The specified initiator group does not exist, is not accessible to the caller, or is not in the same SVM as the specified LUN.

5374922

The specified LUN map does not exist.

Also see the table of common errors in the Response body overview section of this documentation.

Definitions

See Definitions

href

Name Type Description

href

string

igroup

The initiator group to which the LUN is mapped. Required in POST by supplying either the igroup.uuid, igroup.name, or both.

Name Type Description

initiators

array[string]

The initiators that are members of the initiator group.

os_type

string

The host operating system of the initiator group. All initiators in the group should be hosts of the same operating system.

protocol

string

The protocols supported by the initiator group. This restricts the type of initiators that can be added to the initiator group.

replicated

boolean

This property reports if the initiator group is replicated.

node

The LUN node.

Name Type Description

name

string

The name of the LUN's node.

uuid

string

The unique identifier of the LUN node.

smbc

"Properties related to SM-BC replication."

Name Type Description

replicated

boolean

This property reports if the LUN is replicated via SM-BC.

lun

The LUN to which the initiator group is mapped. Required in POST by supplying either the lun.uuid, lun.name, or both.

Name Type Description

node

node

The LUN node.

smbc

smbc

"Properties related to SM-BC replication."

reporting_nodes

A cluster node from which network paths to the LUN are advertised by ONTAP via the SAN protocols.

Name Type Description

_links

_links

svm

SVM, applies only to SVM-scoped objects.

Name Type Description

name

string

The name of the SVM. This field cannot be specified in a PATCH method.

uuid

string

The unique identifier of the SVM. This field cannot be specified in a PATCH method.

lun_map

A LUN map is an association between a LUN and an initiator group. When a LUN is mapped to an initiator group, the initiator group's initiators are granted access to the LUN. The relationship between a LUN and an initiator group is many LUNs to many initiator groups.

Name Type Description

igroup

igroup

The initiator group to which the LUN is mapped. Required in POST by supplying either the igroup.uuid, igroup.name, or both.

lun

lun

The LUN to which the initiator group is mapped. Required in POST by supplying either the lun.uuid, lun.name, or both.

replicated

boolean

The replicated property only applies when the initiator group is replicated and the mapped LUN is a member of a SnapMirror Synchronous relationship. When these conditions are met, replicated defaults to true, and maps are replicated. The replicated property can be PATCHed to false to disable this replication for a LUN map. When set to false, the LUN map on the remote cluster is deleted. When set to true, the LUN map on the remote cluster is created. This property is closely related to the local_delete_only query parameter that can be used during DELETE. The properties achieve the same result, with the difference being the cluster where the map is deleted. PATCH the replicated property to false to keep the local map and delete the remote map. DELETE with local_delete_only set to true to delete the local map and keep the remote map.

reporting_nodes

array[reporting_nodes]

The cluster nodes from which network paths to the mapped LUNs are advertised via the SAN protocols as part of the Selective LUN Map (SLM) feature of ONTAP.

When a LUN map is created, the cluster node hosting the LUN and its high availability (HA) partner are set as the default reporting node. In POST, the property additional_reporting_node may be used to add an additional node and its HA partner.

  • readOnly: 1

  • Introduced in: 9.10

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

returned_error

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.