How To Create iSCSI LUN In NetApp Cluster Mode

Today we will discuss how we can create ISCSI LUN in SVM NetApp Cluster-Mode and allocate it to a Windows Host. In a previous post, we discussed how to configure iSCSI in Netapp Cluster-Mode. We suggest going through it before learning iSCSI LUN allocation.

How To Create iSCSI LUN in NetApp Cluster Mode
How To Create iSCSI LUN in NetApp Cluster Mode

Complete Steps For ISCSI LUN Allocation

Below are the overall steps need to perform for creating iSCSI LUN in. NetApp Cluster-Mode.In addition to creation, we will how to map it to a windows host.

  • 1. Create Volume in SVM.
  • 2. Create a LUN over the volume.
  • 3. Create a Port Set in SVM.
  • 4. Create an Initiator group in SVM.
  • 5. Bind the initiator group to the port set.
  • 6. Map the LUN to the Initiator group.
  • 7. Discover the device in Windows Server.    

Below is a Youtube video that has a live demo to create and map ISCSI LUN in NetApp Cluster-Mode. You can subscribe to the channel for more such videos.

We are going to discuss each step one by one along with the command.

Step 1: Create Volume in SVM

  The below command creates a volume in SVM. This step is necessary because a LUN can reside over a volume or qtree. The volume should be thick volume as per NetApp’s best practice recommendation.

volume create -vserver vs1 -volume vol1 -aggregate aggr1 -state online -junction-path /vol1 -size 1G -space-guarantee volume

Step 2. Create a LUN On Volume

  In this step, we will create a LUN over a volume. As per your need, we should create a thick or thin LUN. In this command the “-space-reserve enable” makes the LUN as thick.

If you specify “-space-reserve disable” then LUN becomes a thin LUN.

lun create -vserver vs1 -path /vol/vol1/lun1 -size 1GB -ostype windows_2008 -space-reserve enabled   

Step 3. Create Port Set in SVM

  Port Sets are nothing but a grouping of target iSCSI LIFs. It is better to use ports sets when we have multiple iSCSI LIFs on a node. As a result, you can restrict traffic flow between certain target FC ports to a specific initiator.

Below is the command that creates a port set and adds two iSCSI target LIFs.

portset create -vserver vs1 -portset portset1 -protocol iSCSI -port-name iscsilif1,iscsilif2

You can see the port set details by executing the below command.  

portset show -vserver vs1

Step 4. Create An Initiator Group

  In this step, we are going to create an initiator group in SVM. This is also called IGROUP which is nothing but a collection of initiator IQN number. In iSCSI LUN allocation IQN is similar to WWPN in FC protocol.    

igroup create -vserver vs1 -igroup igroup1 -protocol iscsi -ostype windows_2008 -initiator iqn.1991-05.com.microsoft:hostA

Step 5. Bind I GROUP to Port Set

  In this step, we will bind the igroup to the port set. Once this step is completed the initiator will be able to communicate to the iSCSI target LIFs. Below is the command to bind an igroup to port set in SVM.  

lun igroup bind -vserver vs1 -igroup igroup1 -portset portset1

Steps 6: Map iSCSI LUN IGROUP

  In this step, we will map or present the LUN to the initiator group. After that, the LUN will be visible to the initiator. Below is the command to map the ISCSI LUN to an initiator.  

lun mapping create -vserver vs1 -path /vol/vol1/lun1 -igroup igroup1

Step 7. Discover New iSCSI Lun In Windows Server

LUNs on your Storage Virtual Machine (SVM) appear as local disks to the Windows host. You must manually rescan disks to discover the new LUN.

Below are the steps to do it for windows 2008 server.  

Steps 1. Open the Windows Computer Management utility:

Navigate to Computer Management Windows Server 2008 Start > Administrative Tools > Computer Management  

Step 2. Expand the Storage node in the navigation tree.

Step 3. Click Disk Management

LUNs appear in Windows Disk Management as disks. You need to initialize the disk as a basic disk with a GPT or MBR partition table.

You need to format the LUN with a file system such as NTFS, below are the steps to do it.

  • Steps 1. Start Windows Disk Management.
  • Steps 2. Right-click the LUN, and then select the required disk or partition type.
  • Steps 3. Follow the instructions in the wizard.  

Once these steps are completed you can go to My Computer and can see the new drive. Make sure that you create and delete files in the drive.

This concludes the steps on ISCSI LUN creation in SVM and maps it to a windows server.

Leave a Reply

Your email address will not be published. Required fields are marked *