Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

Managing LUNs and LUN maps

Tasks to manage LUNs and LUN maps  Top

You can use the command-line interface or FilerView to

Actions that require host-side procedures  Top

The host detects LUNs as disk devices. The following actions make LUNs unavailable to the host and require host-side procedures so that the host detects the new configuration.

The procedure depends on your host operating system. For example, on AIX hosts, you use the cfgmgr command. For detailed procedures, see the documentation for your Host Support Kit or Host Attach Kit.

Controlling LUN availability  Top

The lun online and lun offline commands enable and control the availability of LUNs while preserving mappings.

Before you bring a LUN online or take it offline, make sure that you quiesce or synchronize any host application accessing the LUN.

Bringing a LUN online

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

Taking a LUN offline makes it unavailable for block protocol access. 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

Unmapping a LUN from an igroup  Top

To remove the mapping of a LUN from an igroup, 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

Renaming a LUN  Top

To rename a LUN, completing the following step.

Step

Action

1

Enter the following command:

lun move lun_path new_lun_path

Example

lun move /vol/vol1/mylun /vol/vol1/mynewlun

Note
If you are organizing LUNs in qtrees, the existing path (lun_path) and the new path (new_lun_path) must be in the same qtree.

Resizing a LUN  Top

You can increase or decrease the size of a LUN; however, the host operating system must be able to recognize changes to its disk partitions.

Restrictions on resizing a LUN

The following restrictions apply:

For additional restrictions on resizing a LUN, see the following documents:

To change the size of a LUN, complete the following steps.

Caution
Before resizing a LUN, ensure that this feature is compatible with the host operating system.

Step

Action

1

Take a LUN offline before resizing it by entering the following command:

lun offline lun_path

Example

lun offline /vol/vol1/qtree/lun2
2

Change the size of the LUN by entering the following command:

lun resize [-f] lun_path new_size

-f overrides warnings when you are decreasing the size of the LUN.

Example

(Assuming that lun2 is 5 GB and you are increasing it to 10 GB)

lun resize /vol/vol1/qtree1/lun2 10g
3

From the host, rescan or rediscover the LUN so that the new size is recognized.

Modifying the LUN description  Top

To modify the LUN description, complete the following step.

Step

Action

1

Enter the following command:

lun comment lun_path [comment]

Example

lun comment /vol/vol1/lun2 "10GB for payroll records"

Note
If you use spaces in the comment, enclose the comment in quotation marks.

Enabling or disabling space reservations for LUNs  Top

To enable or disable space reservations for a LUN, complete the following step.

Caution
If you disable space reservations, write operations to a LUN might fail due to insufficient disk space and the host application or operating system might crash. When write operations fail, Data ONTAP displays system messages (one message per file) on the console, or sends these messages to log files and other remote systems, as specified by its /etc/syslog.conf configuration file.

Step

Action

1

Enter the following command:

lun set reservation lun_path [enable | disable]

lun_path is the LUN in which space reservations are to be set. This must be an existing LUN.

Note
Enabling space reservation on a LUN fails if there is not enough free space in the volume for the new reservation.

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 be accessed only with the iSCSI or FCP protocol by default. However, you can use NAS protocols to make a LUN available to a host if the NAS protocols are licensed and enabled on the storage system. The usefulness of accessing a LUN over NAS protocols depends on the host application.

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

If you want to write to a LUN using a NAS protocol, you must take the LUN offline or unmap it to prevent an iSCSI or FCP host from overwriting data in the LUN. To make a LUN accessible to a host that uses a NAS protocol, complete the following steps.

Step

Action

1

Determine whether you want to read, write, or do both to the LUN over the NAS protocol and take the 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 Page (Alt-p) Next Page (Alt-n) Comments