rss logo

Installing and Deploying DFS with Replication

Intro

Microsoft Logo

We will discuss here about how to install and configure a complete DFS architecture. I will stay simple, as I will only use two DFS servers.

The goal here is to provide High Availability for the Network Shares.

Indeed, in case that one of the two servers should fail the second would take over seamlessly.

Network diagram

Windows Sever | Network Diagram of a DFS Architecture

Installing DFS role (SRV01 and SRV02)

We need to install DFS roles on both server, we could do it with Graphical User Interface way or via PowerShell.

PowerShell

  • Install Replication and Namespace roles in one PowerShell command :
PS C:\Users\administrator.STD> Install-WindowsFeature "FS-DFS-Namespace","FS-DFS-Replication" -IncludeManagementTools

GUI

  • From Server manager dashboard, Add Roles and Features :
Windows Server | Server manager dashboard, Add Roles and Features
  • Select Role-based or feature-based installation :
Add Roles and Features | Select installation type
  • Select local server :
Add Roles and Features | Select destination server
  • Select DFS Namespace and DFS Replication roles :
Add Roles and Features | Select dfs roles
  • No Feature, click Next :
Add Roles and Features | Select features
  • Check Restart destination server and click on Install :
Add Roles and Features | Confirm installation selections

DFS Namespace

  • Open the DFS Management console («dfsmgmt.msc») :
Windows | run, dfsmgmt.msc

Create Namespace

  • From DFS Management console, right click to Namespaces and choose New Namespace… :
DFS Management | New Namespace menu
  • Click Browse :
New Namespace Wizard | Steps : Namespace Server
  • Search and select the first server :
New Namespace Wizard | Steps : Select Computer
  • Click Next :
New Namespace Wizard | Steps : Namespace Server
  • Enter a name for the Namespace :
New Namespace Wizard | Steps : Namespace Name and Settings
  • Let default and click Next :
New Namespace Wizard | Steps : Namespace Type
  • Click Create :
New Namespace Wizard | Steps : Review Settings and Create Namespace
  • Click Close :
New Namespace Wizard | Steps : Confirmation
  • Your brand new Namespace shoud appear :
DFS Management | Add Namespace Server

Add Namespace Server

We now need to add our SRV02 as namespace server.

  • From DFS Management console, right click to Namespaces and choose Add Namespace Server… :
DFS Management | Add Namespace Server
  • Click Browse :
DFS Management | Add Namespace Server
  • Search and select the second server :
DFS Management | Select Computer
  • Click OK to add second server :
DFS Management | Add Namespace Server
  • You should now see your two servers as namespace server :
DFS Management | std.local namespace with two servers

Create Folder Targets

  • From DFS Management console, right click to your namespace and choose New Folder… :
DFS Management | New Folder menu
  • Give a name to your folder and click Add… :
DFS Management | New Folder, add folder target
  • Click Browse :
DFS Management | Add folder target, Path to folder target window
  • Click New Shared Folder… :
DFS Management | Add folder target, Browse for Shared Folders window
  • Click Browse… :
DFS Management | Add folder target, Create Share
  • Select a folder and click OK :
DFS Management | Add folder target, select folder
  • Give a name to your Share and click OK, three times :
DFS Management | Add folder target, create share window DFS Management | Add folder target, Browse for Shared Folders Window DFS Management | Add folder target window
  • Repeat the same procedure in order to create SRV02 folder :
DFS Management | Add folder, New Folder Window
  • Once you have your two Folder targets configured, click OK :
DFS Management | Add folder target, New Folder Window with two folder targets
  • A prompt window will appear asking to automaticaly set replication, as we will do it manually, click No :
DFS Management | Replication Window warning
  • You should now see your Folder targets :
DFS Management | Target Folder with two servers configured
  • And should now be able to access to your share via Namespace :
windows explorer accessing to share via namespace

Share Permissions

  • If you try to create a file from your Namespace you should have a Destination Folder Access Denied window :
Windows explorer warning window : You need permission to perform this action

That's because by default we only have read access. Let's see how to change this.

  • From DFS Management Console, right click to the SRV01 entrie, and click Properties :
DFS Management | Folder target, properties menu
  • From General tab, click Share Permissions… :
DFS Management | Folder target, Properties window
  • Check the boxes to add Permissions rights for everyone, and click OK :
DFS Management | Folder target, Permissions for common window

Do the same for the SRV02 entrie.

  • Now you should be able to create Files :
Windows explorer with new text document
  • If we have created files on our nameshare we can see that they are present on only one of our two servers :
Two Windows explorer opened on two servers share

That's perfectly normal, because now we have to set the DFS replication in order to have same files on our both servers. That what we will see in the next chapter.

DFS Replication

As we can see on this schema, DFS Replication will allow to synchronize our two Common folders which are localy present on our servers.

DFS Management | DFS Replication Schema
  • From DFS Management console, right click to Replication and select New Replication Group… :
DFS Management | Replication Menu, New Replication Group
  • Select Multipurpose replication group and click Next :
DFS Management | New Replication Group Wizard, Replication Group Type
  • Set the replication name :
DFS Management | New Replication Group Wizard, Name and Domain
  • From the Replication Group Members click Add… :
DFS Management | New Replication Group Wizard, Replication Group Members
  • Add our two servers name and click OK :
DFS Management | New Replication Group Wizard, Select Computer
  • Then click Next button :
DFS Management | New Replication Group Wizard, Replication Group Members
  • Select Full mesh and click Next :
DFS Management | New Replication Group Wizard, Topology Selection
  • From Replication Group Schedule and Bandwidth select an appropriate bandwidth depending to the speed of the link between the two servers. Since they are on the same local network in my architecture I set Full Bandwidth :
DFS Management | New Replication Group Wizard, Replication Group Schedule and Bandwidth
  • Set the Primary Server from which we want to replicate to other members :
DFS Management | New Replication Group Wizard, Primary Member
  • We now need to specify the Folders to Replicate. In our case these are the two shared folders present in D:\Common on our two servers :
DFS Management | New Replication Group Wizard, Folders to replicate
  • Click Browse :
DFS Management | New Replication Group Wizard, Add folder to replicate
  • Select Common folder :
DFS Management | New Replication Group Wizard, Add folder to replicate, Browse For Folder
  • Validate by clicking on OK :
DFS Management | New Replication Group Wizard, Add Folder to replicate
  • Click Next :
DFS Management | New Replication Group Wizard, Folders to replicate
  • Click Edit to specify the path to the Common folder on the SRV02 server :
DFS Management | New Replication Group Wizard, Local Path of Common on Others Members
  • Select Enabled and click on Browse :
DFS Management | New Replication Group Wizard, Edit
  • Select Common folder :
DFS Management | New Replication Group Wizard, Add folder to replicate, Browse for folder
  • Validate by clicking on OK :
DFS Management | New Replication Group Wizard, Add folder to replicate, Edit window
  • Click Next :
DFS Management | New Replication Group Wizard, Local Path of Common on Other Members
  • Finally click Create to create our Replication Group :
DFS Management | New Replication Group Wizard, Review Settings and Create Replication Group
  • And close the window after checking that all steps have been successfully completed :
DFS Management | New Replication Group Wizard, Confirmation
  • From the DFS Management console, you should now see the Replication Group :
DFS Management | Replication Group, with two servers
  • After a few minutes (depending on the speed of the network and the size of the data to replicate) we should see our two folders synchronized :
Two Windows Explorer with two shares that are synchronized
  • If you have a uge amount of files to replicate and you want to check the replication status see this : link.
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :

contact mail address