iSCSI Port Binding in vSphere 6

My first interaction with iSCSI and port binding was back in 2013 when we introduced an iSCSI based SAN (Dell MD3200i) in our environment. We were a small SMB entity and introduction of SAN for our vSphere environment was a very big thing for me as an administrator.

This was our architecture back then

13.PNG

I clearly remember that before starting the SAN implementation, I was contacted by Dell engineer to do some pre-work which included creating 2 vmkernel portgroup and each with only one vNIC as active and one as unused so as to achieve multipathing with iSCSI.

At that time I was aware of multipathing and what it does, but I was confused on Active/Unused adapter configuration (as I was still learning) and when the actual implementation started, the implementation guy explained it and that was first time when I heard the word Port Binding.

Its time to refresh the concepts now as I am going through my VCAP preparations.

Multipathing for software iSCSI

For those environments which uses software iSCSI to connect to Storage Array, multipathing is possible at the VMkernel network adapter level, but it is not the default configuration. The default iSCSI configuration creates only one path from the software iSCSI adapter (vmhba) to each iSCSI target.

iSCSI port binding, binds an iSCSI initiator interface on a ESXi host to a vmknic and configures accordingly to allow multipathing in a situation where both vmknics are residing in the same subnet. In normal circumstances, if you have multiple vmkernels on the same subnet, the ESXi host would simply choose one and not use both.

Pre-requisites for configuring port binding?

Before start configuring, you must remember that:

  • Array Target iSCSI ports must reside in the same broadcast domain and IP subnet as the VMkernel port.
  • All VMkernel ports used for iSCSI connectivity must reside in the same broadcast domain and IP subnet.
  • All VMkernel ports used for iSCSI connectivity must reside in the same vSwitch.

Below diagram from VMware shows one such scenario when port binding can be used.

portbinding[2].jpg

How to Configure Port Binding?

We will cover this in 2 parts i.e Configure vSphere Networking and Configure vSphere Storage

Configure vSphere Networking

In this post I am demonstrating the steps when using vDS. Steps are essentially same for when using vSphere standard switches.

Note: You should have atleast 2 or more physical nics on your Esxi host for storage connectivity.

1: Make sure you have uplink portgroup created where you will be hooking up your physical adapters. If they have not been created, then right click on vDS and select Settings > Edit Settings.

Increase number of uplinks and click on Edit uplink names to provide a meaningful name for the uplinks.

iscsi-0.PNG

I have these created in my lab

iscsi-0.1.PNG

Also I have added the one physical NIC’s to each uplink when I added my Esxi host to vDS

2: Next is to create 2 distributed portgroup in vDS and during creation check-mark the “Customize default policies configuration” checkbox

iscsi-1.PNG

Continue with configuration wizard and when you comes to Teaming and failover, make sure to select only one uplink as Active as shown below.

iscsi-2

iscsi-3

3: Select one of the Esxi host and navigate to Manage > Networking > Virtual Switches and add vmkernel portgroup. We need to add 2 portgroup in my lab scenario.

iscsi-4

iscsi-5

Select an existing network and click on browse to select the appropriate portgroup for this vmkernel portgroup.

iscsi-6

iscsi-7

Provide an IP address for the vmkernel portgroup. This IP should be in the same subnet in which your storage device is.

iscsi-8

This is how my lab configuration looks like at the moment

iscsi-9.PNG

Configure vSphere Storage

Select Esxi host and navigate to Storage > Storage Adapters and click on green plus button to add a software iSCSI adapter

iscsi-10

Click OK on the add adapter window.

iscsi-11

Select the newly added adapter and go to Targets tab. You have 2 option for adding the iSCSI target i.e Static Discovery and Dynamic discovery. What are these is explained here

In my lab I am using static discovery

iscsi-13

In my lab I am using openfiler for shared storage  and I have configured multiple targets and to each target I have some LUN’s mapped and I do not want my Esxi hosts to see all targets and me accidentally mounting LUN’s which are meant for other host.

iscsi-14

Provide IP address of storage device, default port for iSCSI is 3260 and the name of target to which LUN’s are mapped on storage side.

iscsi-15

Rescan the HBA adapter for changes to take effect and verify that target is now listing.

iscsi-15.1

Now navigate to Paths tab and make a note of number of paths. As you can see in below screenshot there is only one path to both my LUN’s and if this path is broken then I will lost connectivity to LUN/Storage.

iscsi-16

Navigate to Port Binding tab and click on green plus button.

iscsi-17

Select the vmkernel portgroups which you created for storage connectivity.

iscsi-18

Rescan the HBA adapter so that Paths will become Active. If your Network configuration is correct, you will see the Port group policy as Complaint.

iscsi-19

iscsi-20

Now again go to paths tab and verify number of path to each LUN. In my case now I have 3 paths to both my LUN.

iscsi-21

and thats it. We have configured the Port Binding to achieve multipathing with iSCSI storage.

We can configure port binding using command line as well. You can read the steps from my previous blog which I wrote some time back.

Additional References

ANOTHER LOOK AT ESXI ISCSI MULTIPATHING

Configuring iSCSI port bindings-Lynda Tutorials

I hope you find this post informational. Feel free to share this on social media if it is worth sharing. Be sociable 🙂

Leave a Reply