Managing LUNs and LUN maps
Tasks to manage LUNs and LUN maps
You can use the command-line interface or FilerView to
- Control LUN availability
- Unmap a LUN from an igroup
- Rename a LUN
- Resize a LUN
- Modify the LUN description
- Enable or disable space reservations
- Remove a LUN
- Access a LUN with NAS protocols
Actions that require host-side procedures
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.
- Taking a LUN offline
- Bringing a LUN online
- Unmapping a LUN from an igroup
- Removing a LUN
- Resizing a LUN
- Renaming a LUN
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
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
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
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
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 Windows systems, resizing is supported only on basic disks. Resizing is not supported on dynamic disks.
- If you are running VxVM version 3.5 or lower, resizing LUNs is not supported.
- If you want to increase the size of the LUN, the SCSI disk geometry imposes an upper limit of ten times the original size of the LUN. Data ONTAP also imposes a maximum increase to 2 TB.
For additional restrictions on resizing a LUN, see the following documents:
- Compatibility and Configuration Guide for NetApp's FCP and iSCSI Products at http://now.netapp.com/NOW/knowledge/docs/san/fcp_iscsi_config/
- Documentation for your Host Support Kit or Host Attach Kit.
- Vendor documentation for your operating system.
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
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
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
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
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.
|
Copyright © 1994-2005, Network Appliance, Inc. All rights
reserved.
Part No. 210-01094_B0
File: c5lun-f2.htm
Last updated: 08-Dec-2005 13:25:28