Multipath windows server 2016

How to Enable and Configure MPIO on Windows Server 2016/2012R2?

In this article we will consider how to install and configure MPIO on Windows Server 2016/2012 R2. MPIO (Multi—Path Input Output) is a technology that allows to build fault-tolerant transport to a data storage system (or a storage server) by using redundant paths. Additional paths between a server and a storage are created using redundant physical components (switches, cables, adapters or NICs). This redundancy type has a drawback: an operating system may see the same LUN at different paths and treat it as different drives.

The following screenshot shows that Windows without MPIO sees 2 drives with different paths, which are in fact the same LUN (the list of presented disks may be displayed using the Get-Disk PowerShell cmdlet).

If the OS supports MPIO, it will see each of the disks presented to it in one copy. If MPIO is enabled, a server may access data on a storage using multiple paths that makes access to a connected LUN faster and allows using multiple network or HBA adapters.
MPIO may use an alternative logical path if one or more components fail, thus making an operating system use another route to access a logical disk (LUN) maintaining data access consistency. So, MPIO is an important component of a fail-tolerant storage and data access system, and MPIO modules can distribute the load on the same LUN across different paths.

Installing MPIO Installation on Windows Server 2016/2012R2

Windows Server supports multi-path input output (MPIO) starting from Windows Server 2008 R2. Microsoft MPIO provides high availability and load balancing using multiple connections to a storage, doesn’t depend on any protocols and supports disk array and storage connection using iSCSI, Fiber Channel and SAS.

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

  • From a graphical interface using 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:

Читайте также:  Лучший эмулятор андроида для windows

Add-WindowsFeature -Name ‘Multipath-IO’

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

Get-WindowsFeature -Name ‘Multipath-IO’

Remove-WindowsFeature -Name ‘Multipath-IO’

Configuring MPIO on Windows Server 2016

After installing the MPIO module, you 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).

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 a storage and supports most popular storage devices.

You can do it from the command prompt:

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

mpclaim.exe -r -i -a «»

You 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 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).

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

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

New-MSDSMSupportedHw -VendorId -ProductId

If you connect an iSCSI target via 2 paths and want to use MPIO for it, select iSCSI LUN when you 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:

You can change MPIO timer settings as follows (for example, let’s enable recommended settings for the all-flash array):

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

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 RR

You 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

Читайте также:  Mac лаунчер для windows

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.

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

To mount the drives automatically, change the SAN Policy value to OnlineAll.

Установка и настройка MPIO в Windows Server 2016/2012R2

В этой статье мы рассмотрим особенности реализации, установки и настройки MPIO в Windows Server 2016/2012 R2. MPIO (MultiPath Input Output) или многопутевой ввод-вывод, это технология для построения отказоустойчивого транспорта к системе хранения данных (СХД) или выполняющему эти функции серверу за счет использования избыточных путей. Дополнительные пути между сервером и хранилищем создаются с использованием избыточных физических компонентов (коммутаторы, кабели, адаптеры или сетевые карты). Обратная сторона такой избыточности – операционная система может видеть один и тот же LUN по разным путям и считать их разными устройствами.

На следующем скриншоте видно (список подключенных дисков можно вывести с помощью get-disk), что Windows видит без MPIO видит 2 диска по разным путям, которые по факту являются одним LUN:

Если ОС поддерживает MPIO, она будет видеть каждый из презентованных ей дисков в одном экземпляре. При включенном MPIO сервер может обращаться к данным на СХД по нескольким путям, что увеличивает скорость доступа к подключенному LUN и позволяет задействовать для доступа несколько сетевых или HBA-адаптеров.
MPIO может задействовать альтернативный логический путь при выходе из строя одного/нескольких компонентов, заставив операционную систему использовать для доступа к логическому диску (LUN) резервный маршрут, сохраняя непрерывность доступа к данным. Таким образом MPIO является важным компонентом при реализации отказоустойчивой системы доступа к данным, кроме того входящие в состав MPIO модули позволяют распределять нагрузку между различными путями к одному и тому же LUN-у.

Установка MPIO в Windows Server 2016/2012R2

Windows Server поддерживает многопутевой ввод-вывода MPIO начиная с версии Windows Server 2008 R2. Технология Microsoft MPIO позволяет обеспечить высокую доступность и балансировку нагрузки посредством возможности организации нескольких подключений к СХД, не зависит от протоколов и поддерживает подключение дисковых массивов и хранилищ по iSCSI, Fiber Channel и хранилищ SAS.

MPIO-модуль в Windows Server по умолчанию не включен. Установить его в Windows Server 2016 можно двумя способами:

  • Из графического интерфейса с использованием консоли Server Manager
  • Из командной строки Powershell

Установка MPIO с помощью консоли Server Manager

  1. Откройте консоль Server Manager;
  2. В списке компонентов (Features) найдите и активируйте опцию Multipath I/O;
  3. Завершите установку компонента MPIO и перезагрузите сервер.

Установка MPIO с помощью Powershell

Запустите консоль PowerShell с правами администратора и для установки компонента выполните команду:

Add-WindowsFeature -Name ‘Multipath-IO’

Чтобы убедиться, что модуль MPIO установлен в вашем Windows Server, выполните:

Читайте также:  Rx 6800 memory overclocking linux

Get-WindowsFeature -Name ‘Multipath-IO’

Remove-WindowsFeature -Name ‘Multipath-IO’

Настройка MPIO в Windows Server 2016

После установки MPIO модуля, необходимо активировать его для LUN, которые доступны по нескольким путям. По умолчанию ОС видит каждое подключение к диску как разные логические диски (LUN).

Разрешите модулю DSM от Microsoft (MSDSM) автоматически объединять SAN диски в зависимости от типа подключений. MSDSM автоматически определяет наличие LUN, имеющих несколько путей к СХД и поддерживает большинство популярных систем хранения.

Сделать это можно из командной строки:

  • Для SAS дисков: Enable-MSDSMAutomaticClaim -BusType SAS
  • Для iSCSI дисков: Enable-MSDSMAutomaticClaim -BusType iSCSI

mpclaim.exe -r -i -a «»

Также вы можете включить DSM через графический интерфейс. Откройте консоль управления Server Manager и в меню Tools выберите пункт MPIO (или выполните команду mpiocpl).

Перейдите на вкладку Discover MultiPaths, включите опцию Add support for SAS devices (или Add support for iSCSI devices, если вы используете iSCSI хранилище) и нажмите Add. После этого перезагрузите сервер.

После перезагрузки откройте диспетчер устройств или диспетчер дисков и убедитесь, что количество подключенных дисков (LUN), доступных серверу уменьшилось в 2 раза (при наличии подключений к СХД по двум путям).

Вы можете управлять списком устройств, для которых включена поддержка MPIO на вкладке MPIO Devices (или командой Get-MSDSMSupportedHw ).

Вы можете добавить новые MPIO устройства, нажав кнопку Add или из PowerShell:

New-MSDSMSupportedHw -VendorId -ProductId

Если вы подключаете iSCSI таргет по 2 путям и хотите использовать MPIO для этого подключения, нужно при подключении Target выбрать iSCSI LUN, нажать кнопку Connect и включить опцию Enable multipath.

Затем нажмите на кнопку Advanced и привяжите разные IP адреса инициатора к разным IP адресами target.

С помощью PowerShell можно получить текущие настройки MPIO:

Можно изменить настройки MPIO таймеров так (например, установим рекомендованные настройки для flash массива):

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

Доступны следующие политики балансировки MPIO:

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

Чтобы задать политику балансировки (например, Round Robin):

Set-MSDSMGlobalLoadBalancePolicy -Policy RR

Также политику балансировки можно изменить в свойствах подключенного LUN на вкладке MPIO. В этом примере для массива выбрана политика Round Robin.

Чтобы увидеть полный список PowerShell команд, доступных в модуле MPIO, выполните команду:

Get-Command –Module Mpio

SAN Policy

В Windows имеется специальная политика дисков (SAN Policy), которая определяет, нужно ли автоматически монтировать диски при их подключении к хосту.

Текущую настройку SAN Policy можно получить с помощью diskpart. По умолчанию используется SAN политика Offline Shared.

Чтобы автоматически монтировать диски, нужно изменить значение SAN Policy на OnlineAll.

Оцените статью