ONTAP 9.13.1 commands

lun create

Create a new LUN

Availability: This command is available to cluster and Vserver administrators at the admin privilege level.

Description

This command creates a new LUN of a specific size. You cannot create a LUN at a path that already exists. You must create LUNs at the root of a volume or qtree. You can not create LUNs in the Vserver root volume.

You might find it useful to provide a meaningful path name for the LUN and containing volume. For example, you might choose a name that describes how the LUN is used, such as the name of the application, the type of data that it stores, or the user accessing the data. Examples are /vol/database/lun0, /vol/finance/lun1, and /vol/bill/lun2.

It is recommended that you distribute LUNs across the cluster.

When you can create a LUN, the size of the LUN could be larger than what you specified. The system generates a message if the size of the LUN is different from what you specified.

By default, when you create a LUN, it is online and it is space-reserved. Use the lun offline command to take a LUN offline. When you set space reserved to false, the LUN is non-space reserved.

For non-space reserved LUNs, write operations to that LUN might fail due to insufficient disk space. As a result, the host application or operating system might crash.
When you create a LUN from a file, that file cannot be deleted without deleting the LUN itself.

Parameters

-vserver <Vserver Name> - Vserver Name

Specifies the Vserver.

{ -path <path> - LUN Path

Specifies the path of the new LUN. The LUN path cannot contain any files. Examples of correct LUN paths are /vol/vol1/lun1 and /vol/vol1/qtree1/lun1 .

| -volume <volume name> - Volume Name

Specifies the volume that contains the new LUN.

[-qtree <qtree name>] - Qtree Name

Specifies the qtree that contains the new LUN.

-lun <text> - LUN Name }

Specifies the new LUN name. A LUN name is a case-sensitive name and has the following requirements:

  • Must contain one to 255 characters. Spaces are not allowed.

  • Can contain the letters A-Z, a-z, numbers 0-9, "-", "_", "}", "{", and ".".

{ -s, -size <size> - LUN Size

Specifies the size of the LUN in bytes. You can specify a one-character multiplier suffix:

  • c (1 byte)

  • w (2 bytes)

  • B (512 bytes)

  • k (1024 bytes)

  • M (k*k bytes)

  • G (k*m bytes)

  • T (m*m bytes)

[-use-exact-size <true>] - Use Exact Size

Create the LUN using the exact value specified by the -size parameter instead of rounding the size to best fit the LUN geometry. Size of the LUN must be a multiple of 512 bytes.

| -f, -file-path <text> - File Path }

Creates a LUN using the file path as the source.

| [-foreign-disk <text>] - Foreign Disk Serial number }

LUN is created with the same attributes (size, alignment, bytes per sector and so on) as the specified foreign disk.

[-P, -prefix-size <size>] - Prefix Size

Specifies the size of the prefix stream for the new LUN.

-t, -ostype <LUN Operating System Format> - OS Type

Specifies the OS type for the new LUN. + On an All SAN Array, the following OS types are supported:

  • aix - the LUN will be used with AIX.

  • hyper_v - the LUN will be used with Microsoft Hyper-V.

  • linux - the LUN will be used with Linux.

  • vmware - the LUN will be used with VMware VMFS.

  • windows - the LUN will be used with Microsoft Windows.

    + On all other clusters, the following OS types are supported:
  • aix - the LUN will be used with AIX.

  • hpux - the LUN will be used with HP-UX.

  • hyper_v - the LUN will be used with Microsoft Hyper-V.

  • linux - the LUN will be used with Linux.

  • netware - the LUN will be used with NetWare.

  • openvms - the LUN will be used with Open-VMS.

  • solaris - the LUN will be used with Solaris slice partitioning.

  • solaris_efi - the LUN will be used with Solaris EFI partitioning.

  • vmware - the LUN will be used with VMware VMFS.

  • windows - the LUN will be used with a Master Boot Record (MBR) partition table on Microsoft Windows 2003 or earlier.

  • windows_2008 - the LUN will be used with Microsoft Windows 2008 or later.

  • windows_gpt - the LUN will be used with a GUID Partition Type (GPT) partition table on Microsoft Windows.

  • xen - the LUN will be used with Xen

[-space-reserve {enabled|disabled}] - Space Reservation

Specifies whether the space reservation setting is enabled or disabled for the new LUN. If you set the parameter to enabled , the LUN is space-reserved. If you set the parameter to disabled , the LUN is non-space reserved. The default is enabled .

[-comment <text>] - Comment

A description for the LUN you want to create. If the comment string contains white space, you must enclose the comment string in double quotes. The limit is 254 characters.

[-space-allocation {enabled|disabled}] - Space Allocation

Specifies the value for the space allocation attribute of the LUN. The space allocation attribute determines if the LUN supports the SCSI Thin Provisioning features defined in the Logical Block Provisioning section of the SCSI SBC-3 standard.

Specifying enabled for this parameter enables support for the SCSI Thin Provisioning features.

Specifying disabled for this parameter disables support for the SCSI Thin Provisioning features.

Hosts and file systems that do not support SCSI Thin Provisioning should not enable space allocation.

The default is disabled .

[-class {regular|protocol-endpoint|vvol}] - Class

Specifies the class of the new LUN. The class types are:

  • regular - the LUN is for normal blocks protocol access. This is the default value.

  • protocol-endpoint - the LUN is a vvol protocol endpoint.

  • vvol - the LUN is a vvol data LUN.

{ [-qos-policy-group <text>] - QoS Policy Group

This optionally specifies which QoS policy group to apply to the LUN. This policy group defines measurable service level objectives (SLOs) that apply to the storage objects with which the policy group is associated. If you do not assign a policy group to a LUN, the system will not monitor and control the traffic to it.

If you specify this parameter for a LUN that you want to create from a file and that file belongs to a QoS policy group, Data ONTAP adds the LUN to the specified policy group and removes the file from its policy group. Both the file and the LUN that you created from the file cannot belong to QoS policy groups.
| [-qos-adaptive-policy-group <text>] - QoS Adaptive Policy Group }

This optionally specifies which QoS adaptive policy group to apply to the LUN. This policy group defines measurable service level objectives (SLOs) and service level agreements (SLAs) that adjust based on the LUN’s allocated space or used space.

[-caching-policy <text>] - Caching Policy Name

This optionally specifies the caching policy to apply to the LUN. A caching policy defines how the system caches this volume’s data in Flash Cache modules. If a caching policy is not assigned to this LUN, the system uses the caching policy that is assigned to the containing volume or Vserver. If a caching policy is not assigned to the containing volume or Vserver, the system uses the default cluster-wide policy. The available caching policies are:

  • none - Does not cache any user data or metadata blocks.

  • auto - Read caches all metadata and randomly read user data blocks, and write caches all randomly overwritten user data blocks.

  • meta - Read caches only metadata blocks.

  • random_read - Read caches all metadata and randomly read user data blocks.

  • random_read_write - Read caches all metadata, randomly read and randomly written user data blocks.

  • all_read - Read caches all metadata, randomly read and sequentially read user data blocks.

  • all_read_random_write - Read caches all metadata, randomly read, sequentially read, and randomly written user data.

  • all - Read caches all data blocks read and written. It does not do any write caching.

Default caching-policy is auto.

Examples

cluster1::> lun create -vserver vs1 -path /vol/vol1/lun1 -size 100M -ostype linux

Creates a 100MB LUN at path /vol/vol1/lun1 in Vserver vs1 . The OS type is Linux, and the state is online.

Top of Page