Skip to main content

Resize a LUN in ONTAP

Contributors netapp-aherbin netapp-aaron-holt netapp-dbagwell netapp-thomi

You can increase or decrease the size of a LUN.

About this task

This procedure applies to FAS, AFF, and current ASA systems. If you have an ASA r2 system (ASA A1K, ASA A70, or ASA A90), follow these steps to increase the size of a storage unit. ASA r2 systems provide a simplified ONTAP experience specific to SAN-only customers.

Note

Solaris LUNs cannot be resized.

Increase the size of a LUN

The size to which you can increase your LUN varies depending upon your version of ONTAP.

ONTAP version

Maximum LUN size

ONTAP 9.12.1P2 and later

128 TB for AFF, FAS, and ASA platforms

ONTAP 9.8 and later

  • 128 TB for All-Flash SAN Array (ASA) platforms

  • 16 TB for non-ASA platforms

ONTAP 9.5, 9.6, 9.7

16TB

ONTAP 9.4 or earlier

10 times the original LUN size, but not greater than 16TB, which is the maximum LUN size.

For example, if you create a 100 GB LUN, you can only grow it to 1,000 GB.

The actual maximum size of the LUN might not be exactly 16TB. ONTAP rounds down the limit to be slightly less.

You do not need to take the LUN offline to increase the size. However, after you have increased the size, you must rescan the LUN on the host for the host to recognize the change in size.

Learn more about the lun resize command in the ONTAP command reference.

Example 1. Steps
System Manager

Increase the size of a LUN with ONTAP System Manager (9.7 and later).

  1. In System Manager, click Storage > LUNs.

  2. Click Menu options icon and select Edit.

  3. Under Storage and Optimization increase the size of the LUN and Save.

CLI

Increase the size of a LUN with the ONTAP CLI.

  1. Increase the size of the LUN:

    lun resize -vserver <SVM_name> -volume <volume_name> -lun <lun_name> -size <lun_size>
  2. Verify the increased LUN size:

    lun show -vserver <SVM_name>
    Note

    ONTAP operations round down the actual maximum size of the LUN so it is slightly less than the expected value. Also, actual LUN size might vary slightly based on the OS type of the LUN. To obtain the exact resized value, run the following commands in advanced mode:

    set -unit B

    lun show -fields max-resize-size -volume volume_name -lun lun_name

  3. Rescan the LUN on the host.

  4. Follow your host documentation to make the newly created LUN size visible to the host file system.

Decrease the size of a LUN

Before you decrease the size of a LUN, the host needs to migrate the blocks containing the LUN data into the boundary of the smaller LUN size. You should use a tool such as SnapCenter to ensure that the LUN is properly decreased without truncating blocks containing LUN data. Manually decreasing the size of your LUN is not recommended.

After you decrease the size of your LUN, ONTAP automatically notifies the initiator that the LUN size has decreased. However, additional steps might be required on your host for the host to recognize the new LUN size. Check your host documentation for specific information about decreasing the size of the host file structure.