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

lun mapping create

Contributors
Suggest changes

Map a LUN to an initiator group

Availability: This command is available to cluster and Vserver administrators at the admin privilege level.

Description

This command maps a LUN to all of the initiators in an initiator group (igroup). After you map the LUN, the LUN is visible to all initiators in the igroup.

Data ONTAP ensures that there are no LUN map conflicts whether the LUN is offline or online. A LUN map conflict is a mapping that would violate either of the following rules:

  • Each LUN can be mapped to an initiator only once. A LUN can be mapped to multiple igroups as long as each igroup has a distinct set of initiators.

  • LUN IDs must be unique such that every initiator has a unique ID for each LUN to which it is mapped. If you map a LUN to an igroup, the LUN ID for that mapping cannot be reused by any of the initiators in that igroup.

In order to determine if a LUN ID is valid for a mapping, Data ONTAP checks each initiator in the igroup to make sure that the LUN ID is not used for another mapping that includes that initiator.

Note Prior to mapping a LUN, you must have at least one iSCSI or FCP LIF provisioned on the LUN's owner node and high-availability partner node.

Parameters

-vserver <Vserver Name> - Vserver Name

Specifies the Vserver that contains the LUN you want to map.

{ -path <path> - LUN Path

Specifies the path of the LUN that you want to map. Examples of correct LUN paths are /vol/vol1/lun1 and /vol/vol1/qtree1/lun1 .

| -volume <volume name> - Volume Name

Specifies the volume that contains the LUN you want to map.

[-qtree <qtree name>] - Qtree Name

Specifies the qtree that contains the LUN you want to map.

-lun <text> - LUN Name }

Specifies the LUN name that you want to map.

-g, -igroup <text> - Igroup Name

Specifies the igroup that you want to map.

[-lun-id <integer>] - LUN ID

Specifies the LUN ID for the mapping. The LUN ID is specific to the mapping, not to the LUN itself. This is used by the initiators in the igroup as the Logical Unit Number for the initiator when accessing the storage.

[-additional-reporting-node <nodename>] - Additional Reporting Node (privilege: advanced)

Specifies an additional node to populate the -reporting-nodes list when creating the LUN mapping. The specified node's high availability partner will be automatically populated as well. Use this parameter when preferred data mobility destinations are known ahead of time and the appropriate paths can be pre-configured.

Examples

cluster1::> lun mapping create -vserver vs1 -path /vol/vol1/lun1 -igroup ig1 -lun-id 8

Maps a LUN at /vol/vol1/lun1 on Vserver vs1 to the igroup ig1 with LUN ID 8.