DFSR is a role service of Windows Server that enables to replicate folders between multiple file servers across limited bandwidth network connections.
DFSR (Distributed File System) Replication it's a good solution to keep sync file servers when you have branches and must be share the same File Servers across the organization.
Another use of DFS-R is as Disaster Recovery Solution for the File Servers.
In the past i have publish the article Install and Configure DFS Replication in Windows Server 2012
Today i would like to explain how can setup DFS replication in Windows Server 2016.
Improvements in win2016
Base on Microsoft Technet DFSR in Windows Server 2016 hasn't any improvement
DFSR Requirements before installation
Before start the installation of DFSR it's very important to meet the requirements in your environment
- Update the Active Directory Domain Services (AD DS) schema to include Windows Server 2003 R2 or later schema additions. You cannot use read-only replicated folders with the Windows Server 2003 R2 or older schema additions.
- Ensure that all servers in a replication group are located in the same forest. You cannot enable replication across servers in different forests.
- Install DFS Replication on all servers that will act as members of a replication group.
- Contact your antivirus software vendor to check that your antivirus software is compatible with DFS Replication.
- Locate any folders that you want to replicate on volumes formatted with the NTFS file system. DFS Replication does not support the Resilient File System (ReFS) or the FAT file system. DFS Replication also does not support replicating content stored on Cluster Shared Volumes.
How to Setup DFS Replication
After verify that meet all the requirements we can start to setup DFS Replication in Windows Server 2016
- Open Server Manager
- Click Manage - - > Add Roles & Features
- Click Next
- Leave the Role-base or Feature-based installation and click Next.
-
Leave the default options and click Next.
- Expand File Storage Services - - > File & iSCSI Services and check DFS Replication.
- Click Add Features to return in first screen and click Next.
- Click Next.
- Click Install and wait to finish the Installation.
How to Setup DFS Replication Group
Now we can start to configure DFS Replication across the File Servers.
- From Server Manager click Tools - DFS Management
- Right Click in Replication and select New Replication Group.
- In this scenario we have 2 File Servers so we must select Replication group for data collection.
- Type a name for the Replication Group and the Domain name of your environment.
- Select the source FileServer which contain that data that you want to replicate.
- Click Add and select the folder that you must replicate.
- After add the folder it will seems like this
- Select the destination File Server.
- Select the target folder. Don't create the root folder in the destination because if select the target folder User as in example will be create the Path E:\Users\Users. We don't want this. Just select the previous level before and the replication will be create the Folder. Click Next.
- Configure the Bandwidth and when you would like to Replicate. These settings depends on your requirements. In case that you want to use DFSR for Disaster Recovery it's better to schedule the Replication after hours instead to replicate continuously.
- Select what is best for you and click Next.
- Click Create
- Check the Status all completed sucessfull and click Close
How to Configure DFS Replication
If you are setup dfs replication for the first time it's very common to come across with specific errors because of the wrong configuration or no configuration at all.
It's very important to know what must be change after setup of the DFS-Replication Group.
The most common errors related with the Staging folder.
Staging folder used by DFS Replication as caches for new and changed files that must be ready to replicate. By default the size of the Staging folder is 4GB.
I am sure that you will ask which is the recommended size of the staging folder?
Base on Microsoft Technet the recommended minimum size of staging folder can be calculated with the following Powershell command. The <replicatedfolderpath> is the path to replicated folder.
Get-ChildItem
<replicatedfolderpath> -recurse –force | Sort-Object length -descending | select-object -first 32 | measure-object -property length -sum).sum /1gb
After calculate the staging folder size
- From the DFS Management Console in the Membership Tab right click and select Properties in the first folder.
- Click in Tab Staging
- Change the Quota (in megabytes)
- Click OK
- Another one important configuration is the File Filtering
- From the DFS Management Console select Replicated Folders Tab
- Right click and select Properties in the Replicated Folder.
- In the File Filter you can exclude extensions that you don't want or it mustn't replicate.
- By default has these extensions. If you have these type of files that must replicate then you must remove it from there.
- How can Force or Disable the Replication?
- From the DFS Management Console select the Tab Connections.
- Select the Server that you want to Disable or Force the Replication and with right click you can find the options.
- In the same Tab select the Server that you want. Right click and select properties
- Click in Tab Schedule.
- From here you can schedule the Replication and the Bandwidth usage
- You can click the button View Schedule to see what you have already schedule and the Bandwidth usage.
- If you want to change click Cancel.
- Select Custom connection schedule.
- Click in Edit Schedule.
Now you have Setup and Configure the DFS Replication between two FileServers.
Of course we aren't finish here. Because now we must learn to monitoring how the replication is going.
So I will come back next week to explain DFS Replication monitoringm
Have a nice weekend !!
You can send me an email at info@askme4tech.com or do your comments in Twitter or Facebook
I invite you to follow me on Twitter or Facebook. If you have any questions, send email to me at info@askme4tech.com.