Create a LUN map
POST /protocols/san/lun-maps
Introduced In: 9.6
Creates a LUN map.
Required properties
-
svm.uuid
orsvm.name
- Existing SVM in which to create the LUN map. -
igroup.uuid
origroup.name
- Existing initiator group to map to the specified LUN. -
lun.uuid
orlun.name
- Existing LUN to map to the specified initiator group.
Default property values
If not specified in POST, the following default property values are assigned.
-
logical_unit_number
- If no value is provided, ONTAP assigns the lowest available value.
Related ONTAP commands
-
lun mapping create
Learn more
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
additional_reporting_node.uuid |
string |
query |
False |
The unique identifier of an ONTAP cluster node to add to the default reporting nodes for the LUN map. The HA partner for the node is also added.
|
additional_reporting_node.name |
string |
query |
False |
The name of an ONTAP cluster node to add to the default reporting nodes for the LUN map. The HA partner for the node is also added.
|
return_records |
boolean |
query |
False |
The default is false. If set to true, the records are returned.
|
Request Body
Name | Type | Description |
---|---|---|
_links |
||
igroup |
The initiator group to which the LUN is mapped. Required in POST by supplying either the |
|
logical_unit_number |
integer |
The logical unit number assigned to the LUN when mapped to the specified initiator group. The number is used to identify the LUN to initiators in the initiator group when communicating through Fibre Channel Protocol or iSCSI. Optional in POST; if no value is provided, ONTAP assigns the lowest available value.
|
lun |
The LUN to which the initiator group is mapped. Required in POST by supplying either the |
|
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 For further information, see DOC /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}/reporting-nodes . Platform Specifics
|
svm |
SVM, applies only to SVM-scoped objects. |
Example request
{
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"igroup": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"initiators": [
"iqn.1998-01.com.corp.iscsi:name1"
],
"name": "igroup1",
"os_type": "string",
"protocol": "string",
"uuid": "1ad8544d-8cd1-91e0-9e1c-723478563412"
},
"logical_unit_number": 1,
"lun": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "/vol/volume1/qtree1/lun1",
"node": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "node1",
"uuid": "1cf8aa42-8cd1-12e0-a11c-423468563412"
},
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
},
"reporting_nodes": [
{
"_links": {
"node": {
"href": "/api/resourcelink"
},
"self": {
"href": "/api/resourcelink"
}
},
"name": "node1",
"uuid": "5ac8eb9c-4e32-dbaa-57ca-fb905976f54e"
}
],
"svm": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
}
}
Response
Status: 201, Created
Name | Type | Description |
---|---|---|
_links |
||
num_records |
integer |
The number of records in the response. |
records |
array[lun_map] |
Example response
{
"_links": {
"next": {
"href": "/api/resourcelink"
},
"self": {
"href": "/api/resourcelink"
}
},
"num_records": 1,
"records": [
{
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"igroup": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"initiators": [
"iqn.1998-01.com.corp.iscsi:name1"
],
"name": "igroup1",
"os_type": "string",
"protocol": "string",
"uuid": "1ad8544d-8cd1-91e0-9e1c-723478563412"
},
"logical_unit_number": 1,
"lun": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "/vol/volume1/qtree1/lun1",
"node": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "node1",
"uuid": "1cf8aa42-8cd1-12e0-a11c-423468563412"
},
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
},
"reporting_nodes": [
{
"_links": {
"node": {
"href": "/api/resourcelink"
},
"self": {
"href": "/api/resourcelink"
}
},
"name": "node1",
"uuid": "5ac8eb9c-4e32-dbaa-57ca-fb905976f54e"
}
],
"svm": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
}
}
]
}
Headers
Name | Description | Type |
---|---|---|
Location |
Useful for tracking the resource location |
string |
Error
Status: Default
ONTAP Error Response Codes
Error Code | Description |
---|---|
1254207 |
The LUN is already mapped to the same initiator group. |
2621462 |
The specified SVM does not exist or is not accessible to the caller. |
2621706 |
Both the SVM UUID and SVM name were supplied, but don't refer to the same SVM. |
2621707 |
No SVM was specified. Either |
5374053 |
The LUN is the destination of an ongoing restore operation and is inaccessible for I/O and management. Wait for the restore to complete and try the command again. |
5374127 |
An invalid LUN name was specified. |
5374238 |
The operation is not allowed on a LUN in a Snapshot copy. |
5374316 |
A LUN move operation is in progress on the source LUN. |
5374329 |
A LUN of class |
5374573 |
A node has no interface configured with the iSCSI or Fibre Channel protocols for the specified SVM. |
5374574 |
Multiple nodes have no interface configured with the iSCSI or Fibre Channel protocols for the specified SVM. |
5374581 |
A node has no interface configured with the iSCSI protocol for the specified SVM. |
5374582 |
Multiple nodes have no interface configured with the iSCSI protocol for the specified SVM. |
5374583 |
A node has no interface configured with the Fibre Channel protocol for the specified SVM. |
5374584 |
Multiple nodes have no interface configured with the Fibre Channel protocol for the specified SVM. |
5374652 |
An error was reported by the peer cluster while creating a replicated LUN map. The specific error will be included as a nested error. |
5374901 |
Either |
5374902 |
Either |
5374920 |
The cluster node specified in additional_reporting_node does not exist. |
5374921 |
The cluster node name and UUID specified in additional_reporting_node do not refer to the same cluster node. |
Also see the table of common errors in the Response body overview section of this documentation.
Name | Type | Description |
---|---|---|
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 |
_links
Name | Type | Description |
---|---|---|
self |
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 |
---|---|---|
_links |
||
initiators |
array[string] |
The initiators that are members of the initiator group. |
name |
string |
The name of the initiator group. Valid in POST. |
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. |
uuid |
string |
The unique identifier of the initiator group. Valid in POST. |
node
The LUN node.
Name | Type | Description |
---|---|---|
_links |
||
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 |
---|---|---|
_links |
||
name |
string |
The fully qualified path name of the LUN composed of a "/vol" prefix, the volume name, the (optional) qtree name, and file name of the LUN. Valid in POST. |
node |
The LUN node. |
|
smbc |
"Properties related to SM-BC replication." |
|
uuid |
string |
The unique identifier of the LUN. Valid in POST. |
_links
Name | Type | Description |
---|---|---|
node |
||
self |
reporting_nodes
A cluster node from which network paths to the LUN are advertised by ONTAP via the SAN protocols.
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
The name of the node. Either |
uuid |
string |
The unique identifier of the node. Either |
svm
SVM, applies only to SVM-scoped objects.
Name | Type | Description |
---|---|---|
_links |
||
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 |
---|---|---|
_links |
||
igroup |
The initiator group to which the LUN is mapped. Required in POST by supplying either the |
|
logical_unit_number |
integer |
The logical unit number assigned to the LUN when mapped to the specified initiator group. The number is used to identify the LUN to initiators in the initiator group when communicating through Fibre Channel Protocol or iSCSI. Optional in POST; if no value is provided, ONTAP assigns the lowest available value.
|
lun |
The LUN to which the initiator group is mapped. Required in POST by supplying either the |
|
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 For further information, see DOC /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}/reporting-nodes . Platform Specifics
|
svm |
SVM, applies only to SVM-scoped objects. |
_links
Name | Type | Description |
---|---|---|
next |
||
self |
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. |