What is MPIO and how to use it?

MPIO is an acronym for MultiPath Input Output. This is a framework designed to configure load balancing and failover processes by providing multiple logical paths between storage devices and the server. The logical paths can be created through redundant physical components like buses, controllers, switches or bridge devices. Should one or more controllers, ports or switches fail, the server can route the I/O through an alternate path, the remaining controller, port or switch transparently and with no changes visible to the applications, other than perhaps resulting in increased latency.  

Microsoft provides Device Specific Module (DSM) in Server 2008, 2012 and 2016, supports Asymmetric Logical Unit Access (ALUA), and can configure Multipath I/O (MPIO) environment with the storage device conforming to the SCSI Primary Commands (SPC) specification. DSM provides the load balancing policies, and load balance policies are generally dependent on the ALUA of the storage array attached to Windows-based computers. 

MPIO enables up to 32 alternate connections to add redundancy and load balancing between storage devices and the Microsoft-based server, it provides fault tolerant connectivity to storage which results in high availability and improved performance. MPIO solutions can manage these redundant connections, and I/O requests can be routed through an alternate connection if a component along one connection fails, which greatly mitigate the risk of a system outage at both the hardware and application levels.

Linux can also allows to configure multiple I/O paths between server nodes and storage arrays to provide connection fault tolerance and load balancing across the active connections. When you configure MPIO for a device, the multipath driver monitors the active connection between devices. When the multipath driver detects I/O errors for an active path, it fails over the traffic to the device’s designated secondary path. When the preferred path becomes healthy again, control can be returned to the preferred path.

Now, Let's see how to configure MPIO in Windows and Linux servers.

Windows server

MPIO is an optional feature. By default, it is not installed in Windows Server. MPIO should be installed as a feature through Server Manager. Here are the steps that you should follow to install and use the MPIO feature in Windows Server 2008 R2, Windows Server 2012 or 2016.

Install Native MPIO software.

  • Windows Server 2008 R2

    • Open Server Manager Management Console.
    • Select Features > Features Summary > Add Features, and open Add Features Wizard.
    • Click Next, select Multipath I/O and install.
    • Restart Windows.

  • Windows Server 2012 or 2016

    • Open Server Manager and select Add roles and features.
    • Click Next, and select Multipath I/O in the Features.
    • Click Next, and select Restart the destination server automatically if required.
    • Install, and click Yes.

Open MPIO tool to add storage array.

  • Click MPIO in Administrative Tools
  • Click Discover Multi-Paths, select Add support for iSCSI device, and then click Add, select Yes in the dialog box.
  • Restart Windows.

Adjust MPIO configuration.

  • Open Powershell, enable path verification and custom path recovery.
            
Get-MPIOSetting   # Check the current configuration
Set-MPIOSetting -NewPathVerificationState Enabled    # Enable path verification
Set-MPIOSetting -CustomPathRecovery Enabled    # Enable custom path recovery
  • Restart Windows.

Linux server

Install MPIO.

  • For CentOS

yum install device-mapper-multipath device-mapper-multipath-libs     # CentOS

  • For Ubuntu

apt install multipath-tools   # Ubuntu

Configure MPIO.

  • Copy /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf to /etc/multipath.conf.
  • Add the following configuration in /etc/multipath.conf
defaults {
    user_friendly_names yes
    find_multipaths yes
}
devices {
    device {
        vendor "QStora"
        path_grouping_policy failover
        path_checker tur
        path_selector "round-robin 0"
        hardware_handler "1 alua"
        rr_weight priorities
        no_path_retry queue
        prio alua
    }
}


QStora adopts distributed dual-controller architecture. In cluster mode, a logical volume corresponds to active and standby iSCSI Targets. When users use the logical volume, they only need to ensure that the client can connect to the server IP addresses of the two Targets and enable the MPIO. When the active Target is unavailable due to the failure of the server where the active Target is located, QStora will automatically switch the standby Target to active Target within a few seconds without interrupting the session and ensure the critical business continuity. 


Comments

Popular posts from this blog

Introduction to the basic architecture and operation of Internet Small Computer Systems Interface

Why is QStora a software-defined storage controller