Creating LUNs and mapping to igroups

As part of configuring your SAN environment, you must create LUNs, create your initiator groups (igroups), and map your LUNs to your igroups.

Before you begin

About this task

When you create a LUN, you must specify the LUN OS type. The actual size of the LUN might vary slightly based on the OS type of the LUN. The LUN OS type cannot be modified after the LUN is created.

The metadata for each LUN requires approximately 64 KB of space in the containing aggregate. When you create a LUN, you must ensure that the containing aggregate has enough space for the LUN's metadata. If the aggregate does not contain enough space for the LUN's metadata, some hosts might not be able to access the LUN.

If necessary, you can grow your LUN up to 10 times its original size. For example, if you create a 100 GB LUN, you can grow that LUN to 1,000 GB. You cannot exceed 16 TB, which is the maximum LUN size.

Asymmetric logical unit access (ALUA) is always enabled during LUN creation. You cannot change the ALUA setting.

Procedure

  1. Create your LUNs: lun create -vserver vserver_name -volume volume_name -lun lun_name -size lun_size -ostype lun_ostype -space-reserve enabled|disabled
    Your LUN name cannot exceed 255 characters and cannot contain spaces.
    If your host operating system is Windows 2008 or later, use the windows ostype. The space-reserve option is enabled by default. If you want a non-space-reserved LUN, you must set the space-reserve option to disabled.
    Note: The NVFAIL option is automatically enabled when a LUN is created in a volume.
  2. Create your igroups: igroup create -vserver vserver_name -igroup igroup_name -protocol fcp|iscsi|mixed -ostype lun_ostype -initiator initiator_name
    If your host operating system is Windows 2008 or later, use the windows ostype.
  3. Map your LUNs to igroups: lun mapping create -vserver vserver_name -volume volume_name -lun lun_name -igroup igroup_name
  4. Verify that your LUNs are configured correctly: lun show -vserver vserver_name