dfs management replication

How to Configure DFS Replication on Windows Server 2016?


This manual describes how to configure DFS data replication in the Active Directory domain on servers running Windows Server 2016.

There are two types of Distributed File System (DFS):

  1. Namespace DFS – DFS allows you to create virtual directory trees that unite shared folders across the network. It is possible to configure multiple DFS namespaces. It uses simplified user access to geographically distributed files;
  2. Replication DFS – creates a replicated shared folder and tracks changes in files.

Installing DFS Namespaces and DFS Replication Roles on Windows Server 2016

Install the DFS Namespaces and DFS Replication roles on the two servers running Windows Server 2016 between which the replication will be configured.

dfs replication

Use the DFS Management console (dfsmgmt.msc) to create a new DFS namespace.
You can create a domain-based namespace or stand-alone namespace.

  • Domain-based namespace – namespace integrated into the AD. Allows you to hide the DFS namespace server name from the users, simplifies the replacement of the namespace server as well as transfer the namespace to another server;
  • Stand-alone namespace – allows you to create DFS structures without using an Active Directory Domain Services (AD DS). The high availability of the namespace can be achieved using a failover cluster.

dfs windows

Create a folder in the new namespace. Make sure that the new directory is accessible over the network by the path\\dfsnamespacename\foldername (in our example it is \\contoso.com\public\shareddocs).

dfs replication service

Configuring DFS Replication Between 2 Servers Running Windows Server 2016

Now you can configure DFS replication. DFS Replication allows you to synchronize directories with files (replicated folders) between servers that are part of a DFS replication group. The servers into DFS replication group are connected to each other using DFS connections.

Changes are replicated using the Remote Differential Compression Algorithm (RDC). Only the changed parts of the files are replicated. DFS replication is performed asynchronously, i.e. at a specific point in time, sources may not be consistent.

It is necessary to distinguish between simple FRS replication (File Replication Service) and DFSR (Distributed File System Replication). DFSR appeared in Windows Server 2008, it became possible to use differential compression when performing some changes in the file, but not the entire file, are transferred over the network. In FRS replication, the entire file is copied.

DFS replication is advantageous to use folders between remote branches over slow WAN link for replicating.

When communication between replication partners is lost, replication stops. After the network is restored, replication will continue.
A replication group is a set of servers (members) that participate in the replication of one or more folders.

Before configuring replication, you need to add a network shared folder on the second DFS server. Open the DFS Management console, select the desired namespace, and select Add Folder Target from the context menu.

dfs management

Enter the name of the shared folder and click OK (in our example this is \\host2\dfssharedocs).

windows server dfs replication

You will be prompted to create a new replication group. Click Yes.

dfs distributed file system

Tip. If you clicked No, then to create a new replication group in the DFS management console, right-click on the Replication section and select New Replication Group.

In the DFS Replication Configuration Wizard, you need to verify the name of the replication group and the directory you want to replicate.

configure dfs replication

Check the paths to the shared folders on the servers.

dfs replication group

Select the primary member node on which the initial data is stored and from which initial replication will be performed.

dfs locations

As a rule, Full mesh is selected as the replication topology. In this topology all changes on one node are immediately replicated to all the others.

distributed file sharing

It remains to adjust the schedule and bandwidth that can be used to replicate data. Check the settings and click Create.

A message should appear after the successful creation of a new replication group.

dfs namespace replication

This completes the configuration of the DFS distributed file system and data replication in it.

Try creating a new file in the shared folder on the one of the member server. If the file size is very large, its replication can take several hours or even days, depending on the bandwidth of the communication channel between DFS servers and the DFS replication settings.

dfs windows 10

If 2 users simultaneously edit (or create) the same file, then DFS replicates the version of the file that was changed (created) last. An earlier version of the file is stored in DfsrPrivate\ConflictandDeleted directory on the server that resolves the DFS replication conflict. In this case, an entry about the conflict that has occurred appears in the ConflictandDeletedManifest.xml file.

Tweaking DFS Replication

After creating a DFS replication group, you can change various settings to provide better performance.
In the DFS Management console, expand the Replication section, which contains all the replication groups.

Select the replication group you created. In the right window you will see 4 tabs:

  • Membership – this is a list of network folders between which data is replicated;
  • Connections – describes the topology of relationships between DFS replication partners;
  • Replicated Folders – DFS folder settings;
  • Delegation – replication group permissions.

On the Membership tab, note the Staging Quota value — 4 GB. What it is? When replicating, the DFS service uses intermediate hidden folders that store modified files that need to be transferred to replication partners. These files are stored on each server in a local folder DfsrPrivate\Staging.

dfs management windows

On the Membership tab, open the properties of any folder and go to the Staging tab. As you can see, here you specify the path to the Staging folder and its maximum size (Quota). The default is 4 GB. In large infrastructures, it is desirable to increase the quota size to increase the performance of the DFS file replication service.

Microsoft recommends that this quota should be not less than the total size of the 32 largest files in the replication directory. The total size of the 32 largest files in the directory can be obtained using the following PowerShell command:

Get-ChildItem C:\SharedDOCS -recurse –force | Sort-Object length -descending | select-object -first 32 | measure-object -property length -sum).sum /1gb

If the staging quota for the DFS server is insufficient, events with EventID 4208 will often be recorded in the event log. In this case, it is recommended to increase the staging quota size by 20%.

Tip. Some admins believe that a file that is larger than the quota on the Staging folder cannot be replicated via DFS. This is not true. Such a file can also be replicated normally, just the replication process will take place in several stages (the file will be cut into several parts and transferred in parts), which will somewhat slow down the process.

dfs locations replicated folder

On the Advanced tab, you can specify whether to save the files deleted by users in the ConflictandDeleted folder (it is very convenient to restore) and the quota for this folder (by default, it is also 4 GB).

dfs replicated folder

To switch the DFS directory on a specific server to read-only mode, click the directory and select Make read-only. As a result, users won’t be able to edit or create files in this directory.

dfs windows server 2016

On the Connection tab, you can temporarily suspend replication to one of the servers in the DFS replication group (Disable), or start forced replication (Replication Now).

dfs replication tools

On the Replication Folders tab open the properties of any folder. The File filter field contains a list of file extensions that are not replicated between DFS servers. The default file extensions are .bak, and .tmp. You can add other types of file extensions that don’t need to be replicated, for example video (*.avi, *.mpeg), audio (*.mp3, *.wav), image files (*.iso, *.wim) or other file types.

dfs locations replicated folders

To diagnose DFS replication, you can use system event logs, as well as the current (%windir%\debug\DFSR*.log) and archive DFSR replication log (%windir%\debug\DFSR*.log.gz).

Information about DFS replication settings on the server can be obtained using the PowerShell cmdlet Get-DFSRConnection.

dfs replication location

You may also like:

How to Install phpMyAdmin on IIS in Windows 10 or ... PHPMyAdmin is a web-based open source tool written in PHP designed to help manage MySQL database through the Web browser. Because of this PhpMyAdmin f...
Active Directory Temporary Group Membership on Win... Often some access rights in Active Directory must be granted temporarily, for a certain period of time. In order to avoid the need to monitor the vali...
Data Deduplication on Windows Server 2016 First time data deduplication was introduced in Windows Server 2012. In the Windows Server 2016 represented the 3-rd version of deduplication componen...
Configure Access Based Enumeration on Windows Serv... By default, when user open some shared network folder, SMB displays full list of files and folders on it (of course only if user have permission to ac...
How to Migrate DHCP to Windows Server 2016 Migrating the DHCP service from the old server to the new Windows Server 2016 with saving of all the settings of the old server is quite easy. If the ...

Add Your Comment