How to configure Server to server storage replication [using Win Server 2016]
Audio : Listen to This Blog.
In server-to-server storage replication, Win 2016 replicates its storage with another instance of Win 2016.
Recommended Setup: Win 2016 servers and its Storage must be located in separate physical sites.
Storage Replica Pre-requisites | |
Software Requirements: | |
OS Type | Windows Server 2016 Datacenter Edition |
Features Required on Both Server | Storage Replica, File Server |
Hardware requirements: | |
Disk | Minimum 2 Disks are required / Server |
Network Bandwidth | Greater than or equal 1GB NIC |
Server Memory And Core Requirement | Minimum – 2GB and 2 CoresRecommended – 4GB and 2 Cores |
Identical Disk Size And Disk Sector Size | Disk size and Disk Sector of data disk on both servers must be identical(Same applies for log disk) |
Data Disk:
It is a disk where actual data is stored.
Log Disk:
It is a disk where it stores replicating data into log files. Once replication is complete, it flushes the data into data disk.
Server-to-Server Storage Replication Block Diagram:
Step by Step configuration for Storage Replication between the Servers
Steps | Power shell cmd | Description |
1.
|
Enabling Powershell-Remoting | Allow remote powershell sessions on computers by enabling PowerShell-Remoting cmdlet on both servers. |
Set-Item wsman:\localhost\client\trustedhosts * |
Configure the Trusted Hosts setting in both server machines so the computers will trust each other. | |
2.
|
$Servers = ‘SR2-AD1′,’SR2-AD2’ ForEach { Install-WindowsFeature -ComputerName $Server -Name Storage-Replica,FS-FileServer -IncludeManagementTools -restart } |
Install features “Storage Replica & File Server” using Windows Powershell console by executing below cmdlet. Note: After restart verify features are installed in both servers. |
3. |
Test-SRTopology -SourceComputerName SR2-AD1 -SourceVolumeName e: -SourceLogVolumeName f: -DestinationComputerName SR2-AD2 -DestinationVolumeName e: -DestinationLogVolumeName f: -DurationInMinutes 1 -ResultPath c:\ |
a. Establish‘Test-SRTopology’ cmdlet to determine our source and destination node meet all the Storage replica requirements. b. Examine the Test-SRTopologyReport.html report in “c:\” to ensure our configured nodes that meet all storage replica requirements. |
4. |
New-SRPartnership -SourceComputerName SR2-AD1 -SourceRGName rg01 -SourceVolumeName e: -SourceLogVolumeName f: -DestinationComputerName SR2-AD2 -DestinationRGName rg02 -DestinationVolumeName e: -DestinationLogVolumeName f: |
Establish replication partnership in between the servers using the cmdlet directly on source node after Storage Replica requirements are achieved. |
5. |
Get-SRGroup Get-SRPartnership (Get-SRGroup -Computername SR2-AD1).replicas |
To know replication state between servers by executing this cmdlet. |
6. |
Get-WinEvent -ProviderName Microsoft-Windows-StorageReplica -max 20 | To determine the replication status, run the cmdlet on source server and examine or ensure event id’s 5015, 5002, 5004, 1237, 5001, and 2200 are displayed. |
7. |
(Get-SRGroup -ComputerName SR2-AD2). Replicas | Select-Object numofbytesremaining |
Server to Server storage replica completion is verified by 2 ways, 1. If this cmdlet gives the output as 0, Storage Replication is successful. |
Get-WinEvent -ProviderName Microsoft-Windows-StorageReplica | Where-Object {$_.ID -eq “1215”} | fl |
2. The event ID “1215” states the number of copied bytes and the time taken and block copy completed status. | |
8.
|
Get-SRPartnership | Remove-SRPartnership |
Removing the Replication Partner and Group, a) Remove Replication partnership only on the Source Server using the cmdlet, |
Get-SRGroup | Remove-SRGroup |
b) After removing the replication partner, remove the replication group by executing the cmdlet on the source and Destination server. |