Bobcares

How to enable and configure MPIO on Windows Server 2016/2012 R2?

by | Oct 5, 2020

Webmasters can enable Multi-Path Input-Output or MPIO on a Windows server either from a graphical interface using the Server Manager console
or from the PowerShell command line.

As a part of our Server Management Services, we help our Customers with Windows related requests regularly.

Let us today discuss the possible steps to enable MPIO on the windows server.

Installing MPIO Installation on Windows Server 2016/2012 R2

Windows Server supports multi-path input-output (MPIO) starting from Windows Server 2008 R2.

By default, Windows Server disables MPIO module. There are two ways to install it in Windows Server 2016:

  • From a graphical interface using the Server Manager console
  • From the PowerShell command line

Enable MPIO Using Server Manager

  1. Open the Server Manager
  2. Find and check the Multipath I/O in the Features list
  3. Finish MPIO installation and restart the server

Installing Multipath-IO Using PowerShell

Run the PowerShell console as an administrator and use the following command to install the Windows Server feature:

Add-WindowsFeature -Name 'Multipath-IO'Copy Code

To make sure that MPIO has been installed on the Windows Server, run this command:

Get-WindowsFeature -Name 'Multipath-IO'Copy Code

To disable MPIO, enter the following command:

Remove-WindowsFeature -Name 'Multipath-IO'Copy Code

 

Configuring MPIO on Windows Server 2016

After installing the MPIO module, we need to activate it for the LUNs that are available by multiple paths. By default, Windows sees each connection to a disk as different logical disks (LUNs).

Among MPIO components, there is a special module, MSDSM (Microsoft Device Service Module) that allows you to manage load balancing policies.

Typically, native DSM offers better performance and more features than Microsoft. Thus it would be a good idea to install the DSM module provided by the storage manufacturer (IBM DSM, HP DSM MPIO, etc.) though it is present with the standard Microsoft DSM by default.

Allow the DSM module by Microsoft (MSDSM) to automatically merge SAN disks based on the connection type. MSDSM automatically detects LUNs that have multiple paths to storage and supports the most popular storage devices.

We can do it from the command prompt:

  • For SAS disks: Enable-MSDSMAutomaticClaim -BusType SAS
  • For iSCSI disks: Enable-MSDSMAutomaticClaim -BusType iSCSI

We can do the same using the mpclaim tools. The following command will scan all devices detected by a system, find those that have multiple paths, and enable MPIO support for them:

mpclaim.exe -r -i -a ""Copy Code

Enable DSM vi GUI

We can also enable DSM in the GUI. Open the Server Manager and select MPIO in the Tools menu (or run the command: mpiocpl).

Go to the Discover Multi—Paths tab, check to Add support for SASdevices (or Add supportfor iSCSI devices if you are using iSCSI storage), and click Add. Then restart your server.

After the restart, open the Device Manager (or the Disk Manager) and make sure that the number of connected disks (LUNs) available to your server has reduced twice (if there are two paths to your storage device).

We can manage the list of devices with MPIO support enabled in the MPIO Devices tab (or using the Get-MSDSMSupportedHw command).

We can add new MPIO devices by clicking Add or from PowerShell:

New-MSDSMSupportedHw -VendorId <vend> -ProductId <product>Copy Code

while deploying a cluster, configure MPIO on all nodes.

To use MPIO while we connect an iSCSI target via 2 paths, select iSCSI LUN while we connect a Target, click Connect, and check the Enable multi-path option.

Then click Advanced and bind different initiator IP addresses to different target IP addresses.

You can get current MPIO settings using PowerShell:

Get-MPIOSetting

PathVerificationState : Disabled
PathVerificationPeriod : 30
PDORemovePeriod : 20
RetryCount : 3
RetryInterval : 1
UseCustomPathRecoveryTime : Disabled
CustomPathRecoveryTime : 40
DiskTimeoutValue : 60Copy Code

We can change MPIO timer settings as follows:

Set-MPIOSetting -NewPathRecoveryInterval 20 -CustomPathRecovery Enabled -NewPDORemovePeriod 30 -NewDiskTimeout 60 -NewPathVerificationState EnabledCopy Code

The following MPIO balancing policies are available:

  • FOO — Fail Over Only
  • RR — Round Robin
  • LQD — Least Queue Depth
  • LB — Least Blocks

To change a balancing policy:

Set-MSDSMGlobalLoadBalancePolicy -Policy RRCopy Code

We can also select the balancing policy in the MPIO tab of the connected LUN properties. In this example, the Round Robin policy is selected for the array.
To view the full list of PowerShell commands available in the MPIO module, run this command:

Get-Command –Module Mpio
Copy Code

SAN (Disk) Policy on Windows Server

Windows has a special disk policy (SAN Policy) that determines whether disks must be mounted automatically when they are connected to a host.

We can get the current SAN Policy setting using diskpart. By default, Offline Shared policy for SAN is used:

diskpart
DISKPART>>san<Copy Code

Due to this SAN policy, external storage LUNs may be disabled after a restart. To mount the drives automatically, change the SAN Policy value to OnlineAll.

DISKPART> san policy=OnlineAll
Copy Code

Possible SAN Policy values:

  • OfflineAll : All disks are offline by default
  • OfflineInternal : All disks on internal buses are offline
  • OfflineShared : All disks connected via iSCSI, FC, or SAS are offline
  • OnlineAll : All disks get online automatically (recommended)

[Need any further assistance to enable MPIO on windows server? – We’re available 24*7]

Conclusion

In short, webmasters can enable Multi-Path Input-Output or MPIO on a Windows server either from a graphical interface using the Server Manager console or from the PowerShell command line. Today, we saw how our Support Engineers perform this task.

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

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

Speed issues driving customers away?
We’ve got your back!