Windows Server 2019

Windows Server 2019 Storage Replica Failover Process

In the previous post, we took a look at Storage Replica in Windows Server 2019 Features and Configuration. The new features and configuration that are included with the Windows Server 2019 version of Storage Replica make it an even better solution for the high-availability of your data. We looked at configuring the Storage Replica solution in Windows Server 2019 including the process of installing the feature and setting up replication. In this post, we will take a quick look at the Windows Server 2019 Storage Replica failover process and how this is achieved both via Windows Admin Center and in PowerShell.

Windows Server 2019 Storage Replica Failover Process

In the lab environment, I have a couple of Windows Server 2019 Standard Edition servers configured to test the Storage Replica feature.

  • WIN2019SR01
  • WIN2019SR02

In the lab environment, I have Win2019SR01 configured as the source. Then, Win2019SR02 is configured as the destination for the Storage Replica.

Below, you see I am managing Windows Server 2019 Storage Replica in the Windows Admin Center under the Storage Replica menu.

Storage Replica configured for synchronous replication from Win2019SR01 to Win2019SR02

Failing over in Windows Server 2019 Storage Replica is super simple. It simply involves the Switch direction function found under the More menu for Storage Replica in Windows Admin Center.

Failing over in Windos Server 2019 Storage Replica consists of Switching Directions for replication

Simulating Storage Replica Failure

In the lab scenario outlined above, to simulate a failure, I simply shutdown the Win2019SR01 Windows Server 2019 server. In Windows Admin Center on the Win2019SR02 server, I refreshed the Storage Replica dashboard and start seeing errors as expected.

The first error seen is the Event 5014.

Connection lost to the share hosting the partner replica. LocalReplicationGroupName: TestReplication LocalReplicationGroupId: {7249b191-369e-4e73-be1b-c5093335224f} LocalReplicaName: D: LocalPartitionId: {2fcd3e22-2ecd-45b9-90de-46a79ec5f0a5} ReplicaSetId: {20a93416-88fd-4cd4-abae-ad6e2259b820} RemoteReplicationGroupName: TestReplication RemoteReplicationGroupId: {f6432be9-049f-4309-b9c2-c6bd0af6cecf}

Connection is lost to the primary Storage Replica server

Additional warnings come through the Windows Admin Center console.

Failed to establish a connection to a remote computer. RemoteComputerName: WIN2019SR01 LocalReplicationGroupName: TestReplication LocalReplicationGroupId: {f6432be9-049f-4309-b9c2-c6bd0af6cecf} RemoteReplicationGroupName: TestReplication RemoteReplicationGroupId: {f6432be9-049f-4309-b9c2-c6bd0af6cecf} ReplicaSetId: {20a93416-88fd-4cd4-abae-ad6e2259b820} RemoteShareName:{f6432be9-049f-4309-b9c2-c6bd0af6cecf}.{20a93416-88fd-4cd4-abae-ad6e2259b820} Status: {Network Name Not Found} The specified share name cannot be found on the remote server.

Additional errors trying to contact the primary Storage Replica replication partner

However, one thing I noticed in testing Storage Replica is the state of the primary Storage Replica server did not change the fact that the destination Storage Replica server volume is still in an inaccessible state.

I did notice that I saw an Event 5005 which stated that it entered a stand-by state:

Destination entered stand-by state. ReplicationGroupName: TestReplication ReplicationGroupId: {7249b191-369e-4e73-be1b-c5093335224f} ReplicaName: D: ReplicaId: {20a93416-88fd-4cd4-abae-ad6e2259b820}

When trying to access the D: drive it is still showing inaccessible.

The replication target still has an inaccessible replicated volume

On the Win2019SR02 server, we simply need to Switch direction.

Initiating the switch direction function in Windows Admin Center to the destination Storage Replica server

The Switch partnership direction task completed successfully.

Switch partnership direction is successful switching to Storage Replica destination server

The Source node and the Destination node have now switched directions. We still see the “bang” on the partnership which is to be expected since the other server is still down.

Source and destination Windows Server 2019 Storage Replica servers have switched

I had copied a couple of ISO files to the volume to have something to test Storage Replica synchronization with. Now, after switching the direction, we can now access the volume on the remaining Storage Replica node, Win2019SR02.

After the switch direction operation the volume is accessible on the remaining Storage Replica node

Use PowerShell to Failover Storage Replica

PowerShell can easily be used to perform the same operation.

Set-SRPartnership -NewSourceComputerName WIN2019SR02 -SourceRGname TestReplication -DestinationComputerName WIN2019SR01 -DestinationRGName TestReplication

You will have to verify the operation. Notice the note about may result in data loss.


Wrapping Up

The Windows Server 2019 Storage Replica Failover Process is extremely easy and amounts to changing the direction in your Storage Replica synchronization process.

This can easily be done in Windows Admin Center or PowerShell. Testing the Windows Server 2019 Storage Replica Failover Process was super easy and “just worked”. I didn’t run into any issues in the lab environment testing the process.

Back to top button