Skip to main content
A newer release of this product is available.

lun create

Contributors
Suggest changes

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.

Note 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.
Note 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 (privilege: advanced)

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 (privilege: advanced) }

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 (privilege: advanced)

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

-t, -ostype {vmware|hyper_v|windows_2008|windows_gpt|windows|linux|xen|solaris|solaris_efi|hpux|aix|netware|openvms} - OS Type

Specifies the OS type for the new LUN. The OS types are:

  • aix - the LUN stores AIX data.

  • hpux - the LUN stores HP-UX data.

  • hyper_v - the LUN stores Windows Server 2008 or Windows Server 2012 Hyper-V data

  • linux - the LUN stores a Linux raw disk without a partition table.

  • netware - the LUN stores NetWare data.

  • openvms - the LUN stores Open-VMS data

  • solaris - the LUN stores Solaris raw disk in a single-slice partition.

  • solaris_efi - the LUN stores Solaris_EFI data.

  • vmware - the LUN stores VMware data

  • windows - the LUN stores a raw disk type in a single-partition Windows disk using the Master Boot Record (MBR) partitioning style.

  • windows_gpt - the LUN stores Windows data using the GUID Partition Type (GPT) partitioning style.

  • windows_2008 - the LUN stores Windows data for Windows 2008 or later systems.

  • xen - the LUN stores Xen data

[-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 d