Hyper-V Cluster MPIO iSCSI Installation and Configuration

When configuring storage for Windows Server Hyper-V clusters with SAN storage, you always want to make sure you have multiple paths to your storage for redundancy and performance. With SAN storage and iSCSI you won’t want to utilize link aggregation technologies such as LACP switch LAGs or Switch Embedded Teaming. Instead you want to use something called Multipath I/O or MPIO in Microsoft terms for connecting your Hyper-V hosts using multiple paths to your storage. First, let’s see why you want to use MPIO instead of LACP or other link aggregation technologies and the Windows components that need to be installed in Windows Server to allow utilizing MPIO connections. This will allow Hyper-V hosts to make use of multiple paths connected to iSCSI storage. Let’s look at Hyper-V ClusterMPIO iSCSI installation and configuration and why this is important.

Why Use MPIO instead of Link Aggregation?

Why do you use MPIO instead of link aggregation technolgies like NIC teaming or LACP? The link aggregation technologies certainly have their place and would serve to solve the redundancy problem but would not improve performance. This is due to the fact that Link Aggregation technologies improve throughput when there are unique I/O flows that originate with different sources. The iSCSI flows do not appear to be unique to the aggregation technologies and so do not benefit from any performance boost with link aggregation.  MPIO on the other hand deals with multi-pathing by looking at the initiator and the target, or client and server level.  So multiple initiators can connect to the same or different targets and benefit from the multipathing capabilities that MPIO brings to the mix.
With the above state reason, Hyper-V benefits from the use of MPIO and is the way you want to configure your iSCSI connections when connecting the individual Hyper-V hosts to the iSCSI SAN shared storage.  What is involved with configuring MPIO in Hyper-V?  Let’s look at what is required from the Windows Server side of things.

Hyper-V Cluster MPIO Installation and Configuration

Configuring MPIO in Windows Server requires just a few steps.  They include:
  1. Adding the MPIO Windows Feature
  2. Reboot
  3. Configuring the Add support for iSCSI devices for your particular SAN device
  4. Reboot
  5. Configure iSCSI connections with Enable multi-path
  6. Add all the connections for each target, enabling multi-path
  7. Check multi-path MPIO connections

Configuring MPIO Windows Feature

The first thing you need to do in a Windows Server installation is add the Multipath I/O Windows Feature.  To do that, simply add the Feature in Server Manager or PowerShell with the Add-WindowsFeaturecmdlet.
Enable-Multi-path-IO-Windows-Feature-for-MPIO Hyper-V Cluster MPIO iSCSI Installation and Configuration
Enable Multi-path IO Windows Feature for MPIO
After the installation of Multipath I/O, you will be prompted to restart Windows to finalize the installation.  After restarting Windows, you are ready to enable the add support for iSCSI devices feature for your selected SAN device.  To do this, after the server reboot, launch the MPIO configuration utility by typing mpiocpl at a run menu or cmd line.
After launching the utility, navigate to the Discover Multi-Paths tab, select your SPC-3 compliant device, and check the box Add support for iSCSI devices.  Afterwards, click the Add button.  You will be prompted for a reboot.
Add-support-for-iSCSI-devices-to-configure-MPIO-in-Hyper-V Hyper-V Cluster MPIO iSCSI Installation and Configuration
Add support for iSCSI devices to configure MPIO in Hyper-V
After this reboot, you are ready to start adding your iSCSI connections with multi-path enabled.

Adding Hyper-V iSCSI Connections with MPIO Multi-path

To begin adding target portals and then the targets themselves, launch the iSCSI Initiator Propertiesconfiguration utility.  This can be done by typing iscsicpl at a run or cmd prompt.  Navigate to the Discovery tab and then click the Discover Portal button.
Discover-ports-in-the-iSCSI-initiator-properties Hyper-V Cluster MPIO iSCSI Installation and Configuration
Discover ports in the iSCSI initiator properties
Enter your first iSCSI portal address, then click the Advanced button.
Discover-Target-Portal-in-configuring-MPIO-in-Hyper-V-for-iSCSI Hyper-V Cluster MPIO iSCSI Installation and Configuration
Discover Target Portal in configuring MPIO in Hyper-V for iSCSI
Under the Advanced Settings, you can set a specific Local adapter and Initiator IP.
Discover-target-portal-advanced-settings-MPIO-configuration Hyper-V Cluster MPIO iSCSI Installation and Configuration
Discover target portal advanced settings MPIO configuration
Do this for your multiple target portals.  As you can see below, I have different target portal IPs that have been added using the specific network adapter that aligns with the target portal network address/subnet.
After-adding-both-target-ports-for-MPIO-configuration-in-Hyper-V Hyper-V Cluster MPIO iSCSI Installation and Configuration
After adding both target ports for MPIO configuration in Hyper-V
After adding the portals, click on the Targets tab.  You will see the Discovered targets and they will most likely be in the Inactive status.  Click the Connect button.
Connecting-the-iSCSI-discovered-targets Hyper-V Cluster MPIO iSCSI Installation and Configuration
Connecting the iSCSI discovered targets
On the Connect to Target dialog box, click the Enable multi-path checkbox and then click the Advancedbutton.
Connecting-the-first-target-with-multi-path-and-advanced-settings-for-MPIO-in-Hyper-V Hyper-V Cluster MPIO iSCSI Installation and Configuration
Connecting the first target with multi-path and advanced settings for MPIO in Hyper-V
Here is where the actual magic of the MPIO connections comes into play.  Below, I am setting the Local adapter, then the Initiator IP and Target portal IP.  So our end goal here is to setup the connections using each portal adapter IP.
Setting-the-Initiator-Initiator-IP-and-Target-Portal-IP-for-first-MPIO-connection-in-Hyper-V-iSCSI Hyper-V Cluster MPIO iSCSI Installation and Configuration
Setting the Initiator Initiator IP and Target Portal IP for first MPIO connection in Hyper-V iSCSI
Click the Connect button again on the same discovered target.  Now, I use the second Initiator IPand Target portal IP for the second connection to the same target.
Setting-the-Initiator-Initiator-IP-and-Target-Portal-IP-for-first-MPIO-connection-in-Hyper-V-iSCSI-for-second-connection Hyper-V Cluster MPIO iSCSI Installation and Configuration
Setting the Initiator Initiator IP and Target Portal IP for first MPIO connection in Hyper-V iSCSI for second connection
Now we see the Connected status.  Click the Properties button so you can verify the MPIO status.
First-Hyper-V-MPIO-iSCSI-connection Hyper-V Cluster MPIO iSCSI Installation and Configuration
First Hyper-V MPIO iSCSI connection
Notice you have two identifiers.  Click each one and you will see the respective Target portal group tag.
Verifying-the-first-portal-group-ID-for-MPIO-in-Hyper-V-iSCSI Hyper-V Cluster MPIO iSCSI Installation and Configuration
Verifying the first portal group ID for MPIO in Hyper-V iSCSI
Clicking on the second Identifier and notice the Target portal group tag is the second group tag.
Verifying-the-second-portal-group-ID-for-MPIO-in-Hyper-V-iSCSI Hyper-V Cluster MPIO iSCSI Installation and Configuration
Verifying the second portal group ID for MPIO in Hyper-V iSCSI
Click the Portal Groups tab and you should see both Associated network portals.
Verifying-portal-group-connections Hyper-V Cluster MPIO iSCSI Installation and Configuration
Verifying portal group connections
For each Identifier, you can Configurer Multiple Connected Session settings by clicking the MCS button.
Configuring-Multiple-Connected-Session Hyper-V Cluster MPIO iSCSI Installation and Configuration
Configuring Multiple Connected Session
Note the MCS policy options that control the multi-pathing behavior.  Options are:
  • Fail Over Only
  • Round Robin
  • Round Robin With Subset
  • Least Queue Depth
  • Weighted Paths
Configuring-the-MCS-policy-for-Hyper-V-MPIO-connections Hyper-V Cluster MPIO iSCSI Installation and Configuration
Configuring the MCS policy for Hyper-V MPIO connections
You will want to complete the above configuration for every Hyper-V host that you have in the Windows Server Hyper-V Failover Cluster to ensure you  have multi-path connections to shared storage.

Verifying Hyper-V iSCSI MPIO Multi-path Connections

There is a powerful little built-in cmd line utility that allows easily seeing the state of your MPIO connections in Hyper-V.  The utility is mpclaim.  Below, you can see your MPIO enabled devices with the command:
  • mpclaim -s -d
Using-mpclaim-to-check-MPIO-devices Hyper-V Cluster MPIO iSCSI Installation and Configuration
Using mpclaim to check MPIO devices
To look at the multipath information for a specific device use:
  • mpclaim -s -d <device ID>
You can see below, I have two active paths to the specific device ID queried.  State is Active/Optimized.
Using-mpclaim-to-verify-path-ID-state-SCSI-Address-and-Weight-for-specific-MPIO-device-in-Hyper-V Hyper-V Cluster MPIO iSCSI Installation and Configuration
Using mpclaim to verify path ID state SCSI Address and Weight for specific MPIO device in Hyper-V

Takeaways

Hyper-V Cluster MPIO iSCSI Installation and Configuration involves a few steps as shown above but is relatively easy to configure.  After adding the Multipath I/O Windows Feature and enabling the iSCSI multi-path plugin for your specific storage array, you can then add your iSCSI targets and connect to them using the multiple portal IP addresses, thus enabling multi-path connectivity to your storage.  This allows for not only having a redundant connection to your storage devices but also allows for optimum performance for iSCSI traffic to the SAN storage.

Post a Comment

0 Comments