I have been working with Microsoft failover clustering in my home lab and needed to configure some of my windows 2008/2012 servers to access LUNs that I created in my OpenIndiana server using COMSTAR. My OpenIndiana server which was built last year originally had 2x1G networks ports. Since then I added a 4x1G NIC because I wanted to dedicate two ports for iSCSI traffic and have the original two ports for home SMB/NFS/FTP traffic. I also needed to have multiple ports for iSCSI since I was planning on doing MPIO(multipath I/O) which gets me fault tolerance and some performance enhancements. With that said, In this article I will detailed how to configure MPIO in a Windows 2012 Server (Same for 2008 R2) to an OpenIndiana COMSTAR target.

Before getting started on the configuration the diagram below has IP addressing information that we will be using. Our client has two network adapters with IP addresses 10.7.2.7 and 10.7.2.8. Our server which is our iSCSI target has two adapters with IP addresses 10.7.2.11 and 10.7.2.12. Note that these IP addresses are all in the same subnet /24 and no routing is happening here.

001

On the windows side of things the first thing that we have to do is to install the MPIO feature.

002

Once you are done installing the feature we then need to configure our network adapters. My server has 4 network adapters with two being dedicated to iSCSI traffic. We need two adapters for MPIO since we want to have multiple paths available to reach our storage.

003

The iSCSI adapters themselves have certain features disabled since they will not need to make use of them.

004

Additionally these have all been configured with static IP addresses.

005

These adapters will not register to DNS since our host should not be reachable on this IP address. For client traffic you should have a separate adapter dedicated to that. In my case, the “LAB” adapter is how clients will connect to this server.

006

After configuring the static IP address and disabling this adapter from registering to DNS you want to disable any power features that might turn the adapter off. If you head over to the properties of the adapter you will find a power management tab that will allow you to disable power saving features.

007

008

The last network modification that you want to make is to modify the binding order of your network adapters. My iSCSI adapters have been put towards the bottom while my adapter dedicated for client traffic is located near the top. Normally, any networks that are not routed should be placed near the bottom. Additionally the following technet blog post has some good recommendations and you should take a look if you are setting up a windows cluster.

You need to press the “ALT” key in order to bring the menu up while you are under network connections.

009

010

Before we continue with setting up our iSCSI initiator you should have created your LUNs in your storage appliance. If you are using OpenIndiana with napp-it then you can check out my previous article that shows you how to do so. I will quickly go over some of the settings here just so that we can have a sense of what we are dealing with. My OI server has 6 network adapters.

011

There are four adapters that are currently up and running while the other two are not configured. I will be using e1000g0 and e1000g1 for iSCSI traffic. Under COMSTAR I have create three LUNs that this server will have access to.

012

I have also created a target “t-sql12” that my windows iSCSI initiator will connect to.

013

Additionally, since I have multiple servers that are using iSCSI to connect to my OpenIndiana target I have created host groups to limit the visibility of LUNs that an initiator can see by filtering via their IQN.

014

I also created target groups and added each target to a group.

015

Since we have multiple network adapters we want to tell OI to use only e1000g0/g1 for iSCSI traffic. We do this by creating a target portal group that has the IP address of these adapters assigned.

016

We then associate the target that we created above to this portal group.

017

Lastly, we create views for each LUN which brings all of this together:

018

A view has a host group, target group, and LUN assigned to it. We know that a host group is composed of the two IQNs with one of those belonging to the server we are configuring and the other belonging to another node in this windows cluster. The target group “tg-sql12” has the iSCSI target “t-sql12” that we created assigned to it as a member and is what our iSCSI initiator will connect to. This iSCSI target “t-sql12” is also associated with a target portal group that has our two network adapters associated to it. The diagram below should help picture this.

019

Now that we have our LUNs created we want to head over to control panel and select iSCSI initiator.

020

In the new window go to the Discovery tab and add the IP address of your iSCSI target.

021

022

023

Once you are done you can hit the refresh button and head over to the targets tab. In this tab you should see a list of targets that have been auto discovered using the portal information we just configured.

024

The target that this server has access to is “t-sql12”. You want to highlight the target that you will connect to and select properties. In the new window we will select “add session”

025

On the new popup you want to select both check boxes and before clicking “OK” hit the advanced tab.

026

In the advanced settings you want to select “Microsoft iSCSI Initiator” for the local adapter and one of the IP addresses for the iSCSI NIC in this server. The target portal IP should be one of the entries we configured above. Since we are not doing CHAP or IPsec then we don’t need to select any of the other options.

027

Hit OK on all windows to exit the iSCSI initiator properties. Before adding any more connections we must enable MPIO by going to control panel and selecting MPIO.

028

In the Discover Multi-Paths tab we must check “Add support for iSCSI devices” and hit Add.

029

Note: You can’t add support for iSCSI devices unless you add a target first and make an iSCSI connection. If you try doing this step first then you will notice that the option is greyed out.

You will be prompted to restart your computer after making this change.

030

Once you have restarted, we will head back over to the iSCSI initiator and select properties on the target that we previously added a session to.

031

We want to go ahead and click add session to add our secondary session. Again, we will select enable multi-path and hit advanced.

032

Make sure to select the other IP address of your iSCSI initiator adapter and the other IP address of your target portal.

033

Hit OK until you are back at the targets tab. In here you want to select the target that we setup the sessions for and hit devices. You should see the disks that your initiator has access to.

034

035

Note how we have each disk listed twice. This is because of the multiple connections that we have opened to each one. If you select a disk and hit MPIO you should see two paths for it and the load balance policy that we are using.

036

Additionally, if we hit details on each session you will see the IP address details for each session identifier.

037

038

You can also look at the volumes that you are accessing via iSCSI using disk management and look at their properties by right clicking on each one and selecting properties.

039

Each disk should have an MPIO tab with multiple paths listed.

040

041

Also, if we do a netstat -n from a command prompt we will see our two TCP connections reaching out to a destination port 3260 which is the official iSCSI target port.

042

Thank you for reading this article. If you have any questions feel free to post in the comments section below.

Leave a Reply

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