Library Table of Contents Index Previous Next Comments

Managing LUNs

Management tasks  Top

You can perform the following tasks to manage LUNs.

How to manage LUN maps  Top

To support a large number of hosts and to enforce access control, Data ONTAP maintains a separate map for each initiator group. This map controls which LUN is accessible to a given initiator group at a given LUN ID.

After you create a LUN, you must map it to the specific initiator group for it to be accessible to the hosts in that initiator group. Use the following guidelines when mapping LUNs:

Using the lun map command automatically brings a LUN online. The lun online and lun offline commands enable and e block protocol accesses while preserving mappings.

Mapping a LUN to an initiator group  Top

The LUN ID is mapped to the initiators (hosts) in the initiator group. You can specify a LUN ID or you can use the number automatically assigned by Data ONTAP, which begins with 0 and increments by 1 every time a new LUN ID needs to be assigned. Network Appliance recommends that you allow Data ONTAP to automatically assign LUN IDs.

To allow Data ONTAP to map a LUN to an initiator group at an automatically assigned LUN ID, complete the following step.

Step

Action

1

Enter the following command:

lun map lun-path igroup LUN_ID 
Example

lun map /vol/vol1/qtree1/lun3 solhost2

Result

Data ONTAP maps lun3 to the initiator group solhost2 at the first available LUN ID, in this case LUN ID 0.

Unmapping a LUN from an initiator group  Top

To remove the mapping of a LUN from an initiator group, complete the following steps.

Step

Action

1

Enter the following command:

lun offline lun-path
Example

lun offline /vol/vol1/lun1

2

Enter the following command:

lun unmap lun-path igroup LUN_ID
Example

lun unmap /vol/vol1/lun1 solaris-igroup0 0

Bringing a LUN online  Top

To bring one or more LUNs online, complete the following step.

Step

Action

1

Enter the following command:

lun online lun-path [lun-path ...]
Example

lun online /vol/vol1/lun0

Taking a LUN offline  Top

Taking a LUN offline makes it unavailable for block protocol access; however, you can write to an offline LUN using NAS protocols. To take a LUN offline, complete the following step.

Step

Action

1

Enter the following command:

lun offline lun-path [lun-path ...]
Example

lun offline /vol/vol1/lun0

Removing a LUN  Top

To remove one or more LUNs, complete the following step.

Step

Action

1

Remove one or more LUNs by entering the following command:

lun destroy [-f] lun-path [lun-path ...]

-f forces the lun destroy command to execute even if the LUNs specified by one or more lun-paths are mapped or are online.

Without the -f parameter, you must first take the LUN offline and unmap it, and then enter the lun destroy command.

Accessing a LUN with NAS protocols  Top

When you create a LUN, it can only be accessed with SAN protocols by default. However, you can make a LUN available to a host using NAS protocols if NAS protocols are licensed and enabled on the filer. The usefulness of accessing a LUN over NAS protocols is host application-dependent.

Note
A LUN cannot be extended or truncated using NFS or CIFS protocols.

If you want to write to a LUN over NAS protocols, you must take the LUN offline or unmap it to prevent overwriting data in the LUN using the SAN protocol. To make a LUN accessible to a host using a NAS protocol, complete the following step.

Step

Action

1

Determine whether you want to read or write to the LUN over the NAS protocol and take appropriate action:

  • If you want read access, the LUN can remain online.
  • If you want write access, ensure that the LUN is offline or unmapped.
2

Enter the following command:

lun share lun-path {none|read|write|all} 
Example
lun share /vol/vol1/qtree1/lun2 read
Result

The LUN is now readable over NAS.

Library Table of Contents Index Previous Next Comments