An interesting Storage Replication (SR) function is available in Windows Server 2016 that makes it possible to replicate a local disk volume to a remote server for disaster recovery. The volume data is automatically synchronized over the network with a secondary server where an identical copy of the volume is always available. Storage Replica replicates data at block level using the SMB v3.1 protocol regardless of the type of file system used (NTFS, CSVFS, ReFS).
The storage replication in Windows Server 2016 runs in active/passive mode. This means that the data is only available on the source server. There are two ways of replication:
- Synchronous replication – the data is written to both servers simultaneously. The primary server waits for a write confirmation from the remote server before writing data (which ensures that there is no data loss in the file system in the event of a low latency network failure).
- Asynchronous replication – the data is written to the primary server and then replicated to the secondary server (can be used to replicate data over a high latency network, but does not guarantee identical data copies in the event of a failure).
Replication storage supports the following scenarios:
- Replication between local server volumes ;
- Server-to-server replication ;
- Storage replication in a scalable cluster ;
- Cluster to cluster replication.
Replica for memory requirements
Your infrastructure must meet the following requirements in order to use the storage replica:
- Windows Server 2016/2019 Edition Datacenter ;
- Both servers must be connected to an Active Directory domain;
- Each server must have two additional hard disks, one for the data and one for the logs. The protocol should be faster than the data disk, ideally an SSD. The size of the data disks must be the same;
- Location of the GUID Partition Table (GPT) on physical hard drives (MBR is not supported) ;
- Supports local drives (SAS/SCSI/SATA), iSCSI, SAN, shared VHD, storage (S2D) on SAS JBOD ;
- At least 2 GB of free memory on the ;
- The network bandwidth between the servers must be at least 1 Gbps with a latency of less than 5 ms in either direction. (This usually limits the distance between replication partners to 20-50 km). It is recommended that the network adapter supports RDMA;
- Open TCP ports 445, 5985 and 5445 between servers.
Installing a storage replicate on the Windows 2016 server
The storage replica function can be installed on Windows Server 2016/2019 via the Server Manager console or via PowerShell :
Install Windows storage replica function – Activate management tools – Restart
Install the replica storage function on both servers. When you’re done, restart your servers.
How do I configure volume replication in Windows Server 2016?
The storage replication system does not have an integrated graphical management console. You can use PowerShell, Windows Administration Center, or a failover cluster (if you are using a cluster) to configure the storage replication.
A list of the PowerShell cmdlets available in the StorageReplica module can be viewed as follows:
Get the command -Storage module -Replica
You can use the Test-SRTopology command to check if your server and network meet the requirements of Storage Replica. You can estimate the current number of I/O operations, network bandwidth, and protocol size. The Test SRTopology command generates an HTML report with current loads and recommendations.
Enable replication of disk D: between two separate servers Server1 and Server2 (disk L: is used for logs, log size 1 GB) :
New Partnership -SourceComputerName Server1 -SourceRGName Server1ReplGr01 -SourceVolumeName E : -SourceLogVolumeName L : -Server2RGName -Server2ReplGr01 -VolumeName -VolumeName D : -Log VolumeTitle E : -SizeEnBytes 1GB
Storage replication – Enable replication using the PowerShell command of the new partnership.
Once the replication on the secondary server is activated, the data disk becomes inaccessible for direct access (RAW format).
You can get more information about volume replication with additional performance counters in PerfMon or PowerShell :
Get Counter – Repository Replication Statistics(*)E Counter.
You can monitor the volume application events via the Event Viewer (application and service logs -> Microsoft -> Windows -> StorageReplica) or via PowerShell :
Get-WinEvent -ProviderName Microsoft-Windows-StorageReplica -max 20
Use this command to change the replication mode in asynchronous mode :
Set-SRPartnership -RepublicationAsynchronous mode
If the primary server fails, you can manually change the direction of data replication by uploading the secondary copy:
Set-SRPartnership -NewSourceComputerName Server2 -SourceRGName Server2ReplGr01 -DestinationComputerName Server1 -DestinationRGName Server1ReplGr01
Use the Get-SRGroup and Get-SRPartnerShip commands to determine the status of the replication group and the direction of replication.
You can check the length of the copy queue:
(Get-SRGroup).Replicas | Select-Object numofbytesremaining
To disable memory replication:
Get-SRPartnership | Delete-SRPartnership (main server only)
Get-SRGroup | Delete-SRGroup (on both servers).
You can use the Windows Administration Center (WAC) to configure the storage replication via the graphical user interface. .
Many companies use DFS replication between datacenters as a data warehouse replication solution. Storage replication has some advantages over DFS replication: Data is replicated at block level (open or used files and VSS snapshots can be replicated); database independence; fast and synchronous replication (no waiting time of a few hours or days as with DFS). However, SR has some drawbacks: 1:1 replication only; high bandwidth and network latency requirements; without clustering, the direction of replication must be changed manually, and the application (user) must be reconfigured on the new server (you can simplify this by using the shared DFS namespace).
With Windows Server 2019 build 17650, Storage Replica is also available in the standard version (you can replicate up to 2 TB per replication partner). A test changeover has also occurred. In this mode, the volume of the partner’s replica can be saved and the replica is paused until the test switch mode is deactivated (any changes in this mode will be reset to the snapshot).
server 2016 supports volume size up to,windows server 2016 ad replication,when to use storage replica,windows server 2016 shared storage,file server redundancy windows 2016,server to server storage replica failover,windows server 2016 dfs replication,server replication software,storage replica waiting for destination,storage replica 5014,windows server iscsi replication,new-srpartnership element not found,csv replication,set-srpartnership,defaulttsvurl,storage replica module for windows powershell,remove-srpartnership,cluster to cluster storage replica,sync-srgroup,windows server file sync,block-level replication,storage replica has failed an application io.,storage replica windows server 2016,windows server replication,storage replica vs dfsr,server to server storage replication,storage spaces direct,storage replica – stretch cluster,windows admin center storage replica,dfs replication