Windows OS Hub
  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange

 Windows OS Hub / Windows Server 2016 / Configuring Storage Replica on Windows Server 2016

December 4, 2019 Windows Server 2016Windows Server 2019

Configuring Storage Replica on Windows Server 2016

A quite interesting feature, Storage Replica (SR), appeared in Windows Server 2016 that allows to replicate the local disk volume to a remote server for disaster recovery. Volume data are automatically synchronized over your network to a secondary server where the identical copy of your volume will always be available. In Storage Replica, the data are replicated at the block level over the SMB v3.1 protocol independently of the file system type used (NTFS, CSVFS, ReFS).

Storage replication in Windows Server 2016 works in Active/Passive mode. It means that the data are available only on the source server. There are two replication modes:

  1. Synchronous replication – the data are written to both servers simultaneously. Prior to writing the data, the primary server is waiting for the writing confirmation from the remote server (provide zero data loss at the file system during a failure within a low-latency network).
  2. Asynchronous replication – the data are written to the primary server and then replicated to the secondary one (can be used to replicate data on a high-latency network, but without guarantee of identical copies of data in case of failure).

Storage Replica supports the following scenarios:

  1. Replication between the local volumes of the server;
  2. Server-to-server storage replication;
  3. Storage replication in the stretch cluster;
  4. Cluster-to-cluster storage replication.

Contents:
  • Storage Replica Prerequisites
  • Installing Storage Replica Feature on Windows Server 2016
  • How to Configure Volume Replication on Windows Server 2016?

Storage Replica Prerequisites

To use Storage Replica, your infrastructure must meet the following requirements:

  • Windows Server 2016/2019 Datacenter edition;
  • Both servers must be joined to the Active Directory domain;
  • Each server must have two additional drives: one for data, the other one for logs. The log drive must be faster than the data drive, ideally, it is an SSD. The data drive sizes must be the same;
  • GUID Partition Table (GPT) layout on a physical disks (MBR is not supported);
  • Local drives (SAS/SCSI/SATA), iSCSI, SAN, shared VHD set, Storage Spaces (S2D) on SAS JBOD are supported;
  • At least 2GB of free RAM on the server;
  • The network throughput between the server must be at least 1 Gbit/s with less than 5 ms latency in both ways. (As a rule, this limits the distance between the replication partners to 20-50 km.) It is recommended that the network adapter supports RDMA;
  • Open TCP ports 445, 5985 and 5445 between the servers.

Installing Storage Replica Feature on Windows Server 2016

You can install the Storage Replica feature on Windows Server 2016/2019 from the Server Manager console or using PowerShell:

enable storage replica von windows server 2016

Install-WindowsFeature Storage-Replica –IncludeManagementTools -Restart

Install-WindowsFeature Storage-Replica

Install the Storage-Replica feature on both servers. When you are ready, restart your servers.

How to Configure Volume Replication on Windows Server 2016?

Storage Replication does not have an integrated graphical management console. To configure storage replication, you can use PowerShell, Windows Admin Center or Failover Clustering console (if you are using the cluster).

You can display the list of available PowerShell cmdlets in the StorageReplica module as follows:

Get-Command -Module storagereplica

Using the Test-SRTopology command, you can make sure if your server and netwok meet the Storage Replica requirements. You can estimate the current number of I/O operations, network throughput, log sizes. The Test-SRTopology cmdlet generates an HTML report with current loads and recommendations.

Test-SRTopology storage replica: average recovery traffic throughput to destination

Enable the replication of D: drive between two separate servers Server1 and Server2 (Disk L: is used for logs, the log size is 1GB.):

New-SRPartnership -SourceComputerName Server1 -SourceRGName Server1ReplGr01 -SourceVolumeName E: -SourceLogVolumeName L: -DestinationComputerName Server2 -DestinationRGName Server2ReplGr01 -DestinationVolumeName D: -DestinationLogVolumeName E: -LogSizeInBytes 1GB

storage replica - enable replication using PowerShell cmdlet New-SRPartnership

After you enable replication on the secondary server, the data disk becomes unavailable for direct access (RAW format).

storage replication partner - raw disk volume

You can get more volume replication information using the additional performance counters in PerfMon or from PowerShell:

Get-Counter -Counter “\Storage Replica Statistics(*)Э

windows server storage repication performance counters

You can monitor the volume replication events using the Event Viewer (Applications and Services Logs -> Microsoft -> Windows -> StorageReplica) or from PowerShell:

Get-WinEvent -ProviderName Microsoft-Windows-StorageReplica -max 20

You can switch the replication mode to asynchronous using this command:

Set-SRPartnership -ReplicationMode Asynchronous

In case of primary server failure, you can manually change the direction of data replication by putting the secondary copy online:

Set-SRPartnership -NewSourceComputerName Server2 -SourceRGName Server2ReplGr01 -DestinationComputerName Server1 -DestinationRGName Server1ReplGr01

To get the replication group state and the direction of replication, use the Get-SRGroup and Get-SRPartnerShip cmdlets.

You can view the length of the copy queue:

(Get-SRGroup).Replicas | Select-Object numofbytesremaining

To disable the storage replication:

Get-SRPartnership | Remove-SRPartnership (on the primary server only)

Get-SRGroup | Remove-SRGroup (on both servers)

To configure Storage Replication from the graphic interface, you can use Windows Admin Center (WAC). configure storage replication on windows server 2016 using windows admin center

Many companies use DFS replication between datacenters as a solution to replicate data storage. SR has some advantages over DFS replication: the data are copied at the block level (replication of open or in-use files, as well as VSS snapshots is possible); database independence; fast and synchronous replication (no need to wait for hours or days like in DFS). However, SR has some disadvantages: only 1-to-1 replication; high network throughput and latency requirements; without a cluster, the direction of the replication is switched manually, as well as reconfiguration of apps (users) to a new server (you can simplify it by using common DFS namespace).

In Windows Server 2019 Build 17650, Storage Replica is available in the Standard edition as well (you can replicate only 1 volume up to 2TB to one replication partner). In addition, the Test Failover mode has appeared. In this mode, a partner replica volume is writable, and the replication stops until the Test Failover mode is disabled (all changes made in this mode are rolled back to the snapshot).

0 comment
2
Facebook Twitter Google + Pinterest
previous post
Windows 10 Install Error 0x80300024
next post
How to Change a Network Location from Public to Private on Windows 10/Windows Server 2016?

Related Reading

How to Sign a PowerShell Script (PS1) with...

February 25, 2021

How to Shadow (Remote Control) a User’s RDP...

February 22, 2021

Configuring PowerShell Script Execution Policy

February 18, 2021

Configuring Proxy Settings on Windows Using Group Policy...

February 17, 2021

Updating Group Policy Settings on Windows Domain Computers

February 16, 2021

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange
  • Windows 10
  • Windows 8
  • Windows 7
  • Windows Server 2016
  • Windows Server 2012 R2
  • Windows Server 2008 R2
  • PowerShell
  • VMWare
  • MS Office

Recent Posts

  • Accessing USB Flash Drive from VMWare ESXi

    February 26, 2021
  • How to Sign a PowerShell Script (PS1) with a Code Signing Certificate?

    February 25, 2021
  • Change the Default Port Number (TCP/1433) for a MS SQL Server Instance

    February 24, 2021
  • How to Shadow (Remote Control) a User’s RDP session on RDS Windows Server 2016/2019?

    February 22, 2021
  • Configuring PowerShell Script Execution Policy

    February 18, 2021
  • Configuring Proxy Settings on Windows Using Group Policy Preferences

    February 17, 2021
  • Updating Group Policy Settings on Windows Domain Computers

    February 16, 2021
  • Managing Administrative Shares (Admin$, IPC$, C$, D$) in Windows 10

    February 11, 2021
  • Packet Monitor (PktMon) – Built-in Packet Sniffer in Windows 10

    February 10, 2021
  • Fixing “Winload.efi is Missing or Contains Errors” in Windows 10

    February 5, 2021

Follow us

woshub.com
  • Facebook
  • Twitter
  • RSS
Popular Posts
  • How to Repair EFI/GPT Bootloader on Windows 10?
  • How to Run Program without Admin Privileges and to Bypass UAC Prompt?
  • Licensing Mode for Remote Desktop Session Host is not Configured
  • Updating List of Trusted Root Certificates in Windows 10/8.1/7
  • Configuring Port Forwarding on Windows
  • How to Upgrade Windows Server 2019/2016 Evaluation to Full Version?
  • Allow RDP Access to Domain Controller for Non-admin Users
Footer Logo

@2014 - 2018 - Windows OS Hub. All about operating systems for sysadmins


Back To Top