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

Controlling block protocol access  Top

The lun online and lun offline commands enable and disable block protocol accesses while preserving mappings.

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; 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

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
The existing lun_path and the 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:

On Solaris, if you are running VxVM, resizing LUNs is not supported.

If you want to increase the size of the LUN, the SCSI disk geometry imposes an upper limit for how large a LUN can be resized, and Data ONTAP imposes a maximum increase of 2 TB, in 1 MB increments.

To change the size 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 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.

Example

For Solaris hosts, use Solaris commands to erase the disk label and create a new one, and then use the Solaris mkfs command to increase the file system on the disk slice to fill the newly enlarged slice.

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.

Modifying a LUN's serial number  Top

To modify a LUN's serial number, complete the following steps.

Step

Action

1

Take the LUN offline by entering the following command:

lun offline lun-path

Example

lun offline /vol/vol1/qtree1/lun2
2

Modify the LUN's serial number by entering the following command:

lun serial lun-path new-serial-number

Example

lun serial /vol/vol1/qtree1/lun2 OcmePIdQxjcH

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, you might experience write failures due to insufficient disk space. When this occurs, 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 only be accessed with the iSCSI protocol 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 iSCSI protocol. To make a LUN accessible to a host using a NAS protocol, complete the following steps.

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 Page (Alt-p) Next Page (Alt-n) Comments