Monday, September 14, 2015

Configuring Microsoft iSCSI Target datastore on Esxi server and multipathing Step by Step

In Microsoft Windows 2012 and above there is cool role is introduced by Microsoft. Name of the role is iSCSI Target Server under File and Storage services. (Although there is same software provided by Microsoft earlier now they have given the same as role inbuilt in Server 2012, Earlier version iSCSI Target configuration), I used it to configure my Microsoft Clustering LAB, as it required shared storage. You can use Microsoft windows 2012 iSCSI Target is better substitute to freeNas or Openfiler.

Userful Script on reporting

vSphere Datastores inventory report powercli - Volume 2


What is iSCSI Target Server? 
This server provides Block level storage. iSCSI Target (Server) shares LUNs with initiators (Clients) using iSCSI protocol over TCP-IP Network. Shared block storage act as local disk to the OS.

In this article I will be using iscsi target to present Datastores to ESXi Servers with Multipathing. Here I have Esxi Servers with two dedicated network cards carrying only Storage traffic IP series 172.16.1.0/25. Both NIC cards are connected to separate switches and my iSCSI storage server has two Ethernet cards are connected to same Switch1 and switch2 respectively. This way I get redundancy if any one of my network card or any one of my switch fails still my traffic is flowing through another Path. In this Article I am going simulate the same thing.
As a start i want you to show how my Ethernet card IP address settings looks like. I have this configuration on my Windows iSCSI Target Server. There are 2 Ethernet cards and each terminated to its own switch. On the same switches my esxi server is connected.

On my esxi server I have completely separate virtual standard switch for Storage traffic. (Select esxi server from vcenter inventory, Select configuration tab, to Networking under hardware at left panel)
And this is my configuration for iSCSI-Storage 01 and 02 port group.  iSCSI-Storage01 has Active adapter  vmnic3  and others in unused (they will not be utilised) and vise versa setting on iSCSI-Storage02 portgroup. This is required to configure vmware multipathing.
Above was how my configuration on both iscsi target and esxi server looks, next I will be configuring iSCSI Target server from scratch. Open Server Manager, Click Manage at the right click top menu. And select Add roles and Features.
 Next 3 windows nothing to configure much click next trice
 Select checkmark iSCSI Target Server under File and storage Services, next is Feature nothing to configuration and click install after confirming the summary.
Once role is installed we will configure it.
On the server manager click File and storage Service on the right panel to configure further installed role.
 Select iSCSI and under task click New iSCSI Virtual Disk or click To create an iSCSI virtual disk, start the new iSCSI Virtual Disk Wizard.
Next provide the path where all the iSCSI virtual disks (vhdx) will be kept on servers local disk, Name the disk, it will suffix required extension vhdx automatically.
Next screen is what would be Lun size.  for size format I will be using vmware terminology.
Fixed Size -- Thick Provisioning
Dynamic Expanding -- Thin provisioning.
Differencing - Linked clone
Next Screen create a new iSCSI Target instance.
Name the target instance,  This is step where we will be adding esxi server IQN's I have added both esxi server's IQNs.
Where do you find those IQN's and what is IQN?
IQN is iSCSI qualified name it is same as something MAC address to NIC card, whenever Data is exchanged between iSCSI target and iSCSI initiator this IQN number is used as the identifier.

To find IQN on esxi server, go to Configuration tab of esxi server, select Storage Adapter from Hardware left panel, select iSCSI Software Adapter and you can copy past iSCSI name
 
Incase if are unable to fine iSCSI Software Adapter you will need to add it as show above and below screen will be pop up.
 Back to previous screen on windows. if you have found IQN number. Next screen has all the summary, start next.
It will take some time to fully create fixed virtual disk. an you will the result as one iSCSI target and attached disks, you can now add more disk you want. to the same target.
Here we are done with Windows server configuration and other all configuration is on Esxi server.
Go to iSCSI software adapter click Properties.
 On the Dynamic Discovery tab click and provide iSCSI server any of one IP, don't type all the IPs.
 Esxi will detect all the Target ports and they will be visible in the Static Discovery Port.
Next we need to configure Port binding in the Network Configuration tab click add and add both the iSCSI vmkernal and associated Physical adapter for both adapter do add bindings. (Above I had already make only one vmnic active to vmkernel port and others are in unused, without that step you will not see iscsi adapters in the binding or they will not be complient)
You should see something like this once you add both VMKernel port groups. Click close to rescan (refresh and discover luns presented for iSCSI target server)
Once rescan is completed you will see one LUN is visible right click it go to Managed Paths.
On the Managed Paths you will see there are 4 paths redundancy available. And path's status is active. 
Here I will simulate some real production scenario, what will happen if one of the physical switch is done. Lets pull the network cable from one of the ESXi Storage dedicated network card.
I pulled cable from vmnic3 and my 2 paths are dead and 2 paths are still available, Pretty cool haa....

3 comments:

Will smith said...

It verbalizes a limitless creativeness. i'm definitely inspired with the real transformation ability of author used for remodeling his thoughts and supplied right here. impressed with deep which means of this text. Shipping Software

aaron said...

These information were very easy to understand. They were very useful for my business. Keep up the good work.

Cloud Migration Services
AWS Cloud Migration Services
Azure Cloud Migration Services
VMware Cloud Migration Services
Cloud Migration tool
Database Migration Services
Cloud Migration Services



Brian said...

I am really impressed with the way of writing of this blog. The author has shared the info in a crisp and short way.