How to Configure Storage Replica for Windows Server 2016 Technical Preview 5

Author by Concurrency Blog

In this blog I will be going through on how to install and configure Storage Replica in Windows Server 2016 Technical Preview 5.  Below is the Microsoft requirements and the bare minimum requirements I got away with while creating storage replica.

 

Microsoft's Prerequisites

  • Two sets of storage, using SAS JBODs, Fiber Channel SAN, iSCSI Target, or local fixed disks (DAS). The storage should contain a mix of HDD and SSD media. You will make each storage set available only to each of the servers, with no shared access.
  • At least one 1GbE connection on each server, preferably 10GbE, iWARP, or InfiniBand.
  • Appropriate firewall and router rules to allow ICMP, SMB (port 445, plus 5445 for SMB Direct) and WS-MAN (port 5985) bi-directional traffic between all nodes.
  • A network between the two sets of servers with at least 1Gbps throughput (preferably 8Gbps or higher) and average of ≤5ms round trip latency.
  • Membership in the built-in Administrators group on all server nodes.

 

Requirements for our testing/setting up purpose

  • 2xServers (recommended identical, I don’t believe this is necessary but it would make it easier overall)
  • At least 2 storage drives (2 in each server other than the system disk, one for Log(SSD) one for data replication)
    • I have not tried partitioning a single Disk to use a partition for logs and Data, it would probably work as we will just be working with the volumes on the disk.
  • Network connection between the 2 servers of course

 

Recommend

  • 2 servers
  • 2+ SSD, 2+ HDD in each server (8 or more total drives + the OS drive in each server)
  • Network connection

These are Microsoft's Disk configuration guidelines

  • You must create two volumes on each enclosure: one for data and one for logs.
  • Log and data disks must be initialized as GPT, not MBR.
  • The two data volumes must be of identical size.
  • The two log volumes should be of identical size.
  • All replicated data disks must have the same sector sizes.
  • All log disks must have the same sector sizes.
  • The log volumes should use flash-based storage, such as SSD.
  • The data disks can use HDD, SSD, or a tiered combination and can use either mirrored or parity spaces or RAID 1 or 10, or RAID 5 or RAID 50.
  • The data volume should be no larger than 10TB (for a first test, we recommend no more than 1TB, in order to lower initial replication sync times).
  • The log volume must be at least 8GB and may need to be larger based on log requirements.
  • The File Server role is only necessary for Test-SRTopology to operate, as it opens the necessary firewall ports for testing.

 

Storage replica

This is exactly what it sounds like, replicating data from one place to another.  For this example we are going to perform server to server replication,  this will go 1 direction only source to destination.  I recommend that the servers be the same in storage configuration wise (disks do not have to be the same size but the volume created must be the same size).  I will take you guys through my experience and fails of installing storage replica.

My setup

HVSR1 (Source Server)

2x 256gb SSD

2x 600gb HDD

 

HVSR1 actually used

LOG SSD 1x256 GB

                                   G: 225GB

REP DATA HDD 2x300GB

                                   F: 300GB

                                           Mirrored

 

HVSR2 (Destination server)

2x 256gb SSD

-ADATA SSD fails to be seen in Storage Pools

2x 600gb HDD

 

HVSR2 actually used

LOG SSD 1x256 GB

                                     G: 225GB

REP DATA HDD 2x300GB

                                     F: 300GB

                                             Mirrored

Network Setup.

In my setup for the network, these servers were on the same network with 4x1GB NICs teamed along with an InfiniBand card in each server.

 

As shown one of my SSD drive failed to be seen so I'll just use a single SSD in my configuration.  Boot up both machines and install the OS (currently TP5).  *****Make sure to install the Datacenter version*****  Standard version does not contain storage replica. (I learned this the hard way as I had to image everything again after I had it set up).

 

Install Storage replica

Note *** they had taken out storage replica as of TP5 so there is no install from the GUI so we'll have to deploy this with PowerShell

$Servers = 'HVSR1','HVSR2'

$Servers | ForEach { Install-WindowsFeature –ComputerName $_ –Name Storage-Replica,FS-FileServer –IncludeManagementTools -restart }

 

Easy enough? Just place in your server name in place of mines which is HVSR1 and HVSR2.  Reboot as necessary.

If you get something along the lines of file not found or cannot find the windows feature, you probably have the standard version of sever 2016 installed.  Please reboot and retry the OS installation again. (Don’t feel sad if you had to start over, I did too)

 

Create the Log drive and data drive with storage space or on your raid card or even in disk manager.  Easiest to have your data drives and log drives labeled with the same drive letter to make it easy to remember which is which when we configure the drive replication.

 

I created my Data disk in Storage Spaces with a mirrored partition, my Log drive was a single SSD.  (Make sure the Disk volume configuration is the same on both servers)

 

Testing your storage replica topology (create a destination folder for the log file, mines was c:\temp)

**HVSR1 will always be my Source Server

**HVSR2 will always be my Destination server

 

PowerShell

Test-SRTopology -SourceComputerName hvsr1 -SourceVolumeName f: -SourceLogVolumeName g: -DestinationComputerName HVSR2 -DestinationVolumeName f: -DestinationLogVolumeName g: -DurationInMinutes 5 -ResultPath c:\temp -Verbose

Again add in your server names in place of mines (HVSR1, HVSR2)

This will check your configuration and tell you if it is valid or not.  I added the Verbose to see what it is doing or else it will not show you anything in yellow.

Machine generated alternative text:
PS Test-SRTop010gy 
-SourceComputerName hvsrl 
-Sou rcevol umeName 
f: -SourceLogVoI umeName 
g: -Desti nat 
i onComputerName HVSR2 
-Desti nati onvol umeName 
f: -Desti nati onLogVoI umeName 
g: -Durati onlnMi nutes 
5 -Resultpath c:\temp 
erbose 
alidating data and log volumes... 
ERBOSE : 
ERBOSE : 
ERBOSE : 
ERBOSE : 
ERBOSE : 
ERBOSE : 
ERBOSE : 
ERBOSE : 
ERBOSE : 
ERBOSE : 
ERBOSE : 
ERBOSE : 
ERBOSE : 
ERBOSE : 
ERBOSE : 
ERBOSE : 
ERBOSE : 
ERBOSE : 
Volume F: 
Volume G: 
Volume F: 
Volume G: 
partition 
partition 
partition 
partition 
Volume F: 
exists on HVSRI 
exists on HVSRI 
exists on HVSR2 
exists on HVSR2 
F: on HVSRI is a GPT—styIe partition 
G: on HVSRI is a GPT—styIe partition 
F: on HVSR2 is a GPT—styIe partition 
G: on HVSR2 is a GPT—styIe partition 
on HVSRI and F: on HVSR2 are identical in size 
File system on volume G: on HVSRI is ReFS 
File system on volume G: on HVSR2 is ReFS 
Sector size of the volume F: on HVSRI and F: on HVSR2 is identical 
Sector size of the volume G: on HVSRI and G: on HVSR2 is identical 
The log volume G: in HVSRI has enough free space to hold the recommended log volume size of 8GB 
The log volume G: in HVSR2 has enough free space to hold the recommended log volume size of 8GB 
Target server HVSR2 can be managed remotely using WMI 
Fi rewalls are configured to allow SMB protocol traffic to and from HVSR2 
The roundtrip average latency between the source server HVSRI and Garget server HVSR2 is within the 
recommended latency threshold of 5 milliseconds 
ERBOSE: HVSRI meets the physical memory requi rement to deploy 
Storage Replica 
ERBOSE: HVSR2 meets the physical memory requi rement to deploy 
Storage Replica 
Measuring Storage Replica recovery and initial synchronization 
performance.. 
Measuring Storage Replica synchronous replication performance.. 
-Ö2-15-34-59.htm1 
est completed. Result at c:\temp\TestSrTop010gyReport-2016-05

Once this completes it will generate a report and place it in your destination folder (mines again was c:\temp)

Since there is no errors we'll go ahead and deploy it.

 

Deploying

New-SRPartnership -SourceComputerName HVSR1 -SourceRGName RG01 -SourceVolumeName F: -SourceLogVolumeName g: -DestinationComputerName hvsr2 -DestinationRGName RG02 -DestinationVolumeName F: -DestinationLogVolumeName g: -LogSizeInBytes 8GB -verbose

Machine generated alternative text:
Measuring Storage Replica recovery and initial synchronization performance... • 
Measuring Storage Replica synchronous replication performance.. 
est completed. Result at html 
PS C:\Windows\system32> New-SRPartnership 
HVSRI 
RGOI 
-Sourcevol umeName F: -SourceLogVo 
-SourceComputerName 
—SourceRGName 
I umeName 
g: -Desti nati onComputerName hvsr2 -Desti nati onRGName 
RG02 
—Destinati onV01umeName F: -Desti nati onLogVoI umeName 
: -LogSi zelnBytes 
8GB 
Desti nati onComputerName 
Desti nati onRGName 
SourceComputerName 
Sou rceRGName 
PSComputerName 
. HVSR2 
. RG02 
. HVSRI 
. RGOI

Once the line returns it should show you the destination server and the source server. (You can see this again if you type in command Get-SRPartnership)

Now your source disk should be replicating to your destination disk.

You have now successfully deployed Server to Server Storage replica!

 

But wait there more!

 

So can I see the status of the sync?

……uhhhh yes and no, Currently there isn't a gui interface with this so to pull what is currently being sync you have to run the power shell command (Get-SRGroup).replicas  You can target selected destination "-computername" or without it, it will show you the host's status.

Machine generated alternative text:
ps (Get-SRGroup 
urrentLsn 
DataV01 ume 
LastlnSyncTime 
Last Knownpri maryLsn 
Las toutOfSyncTi me 
NumOfBytesRecovered 
NumOfBytesRemai ni ng 
partitionld 
partitionsize 
Repl i cati onMode 
Repl i cati onstatus 
PSComputerName 
-computername hvsr2). replicas 
. 46 
. 90378862592 
: 121385254912 
. ea438a01-b377-44d4-8b2f-d21a7ea2a602 
. 298363912192 
Synchronous 
. Initi al BlockCopy

My assumption is that when it says "NumofBytesRemaining" is = 0 it should be completed.

 

Why can't I see my destination files?

While it is currently syncing, the destination volume will be unavailable/not accessible.  Once the syncing is completed, you can stop the continuous sync and your files will be available.

 

How do I stop the sync?

From the source server remove the replication with the PowerShell command. (Do not run this on the destination server or else bad things will happen!)

Get-SRPartnership | Remove-SRPartnership

Get-SRGroup | Remove-SRGroup

Machine generated alternative text:
PS Get-SRPartnership i Remove-SRPartnership 
PS f:\> Get-SRGroup I Remove-SRGroup 
Confi rm 
Are you sure you want to perform this action? 
This action will remove group RGOI. Are you sure you want to continue? 
[Y] Yes [A] Yes to All 
[N] No [L] No to All 
[S] Suspend [?] Help (default is

On the destination server run

Get-SRGroup | Remove-SRGroup

Machine generated alternative text:
PS ndows\system32> Get—SRGroup I Remove—SRGroup 
onfi rm 
re you sure you want to perform this acti on? 
his action will remove group RG02. Are you sure you want to conti nue? 
[N] No [L] No to 
[Y] Yes [A] Yes to 
[S] Suspend [?] Help (default i s 
PS ndows\system32>

You should be able to access the files on the destination files now as your data drive should be available.

 

Odd things

First time I ran through the testing it asked me to open the firewall for SMB transfer so I Open TCP ports 445, 2nd time around it did not.  Not sure why it did not make me do it again, but if it does just open it as it is required for this.

 

Checking replication state commands

 

Get-SRGroup

 shows the machine name and the replica group it belongs to and its current replication state. 

Get-SRPartnership

shows the machine name and the replica group it belongs to and shows the direction of the replication, source and destination sync.

(Get-SRGroup).replicas

Shows detail about the latest sync.

Target the server

(Get-SRGroup -computername hvsr2).replicas

 

Helpful Links

 

Known issues

https://technet.microsoft.com/en-us/library/mt126101.aspx

 

To get more information about other commands please visit

https://technet.microsoft.com/en-us/library/mt126103.aspx

Author

Concurrency Blog

The latest about Concurrency