Installing and Deploying DFS with Replication
- Last updated: Jan 03, 2021
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.
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.
- Install Replication and Namespace roles in one PowerShell command :
PS C:\Users\administrator.STD> Install-WindowsFeature "FS-DFS-Namespace","FS-DFS-Replication" -IncludeManagementTools
- From Server manager dashboard, Add Roles and Features :
- Select Role-based or feature-based installation :
- Select DFS Namespace and DFS Replication roles :
- Check Restart destination server and click on Install :
- Open the DFS Management console («dfsmgmt.msc») :
- From DFS Management console, right click to Namespaces and choose New Namespace… :
- Search and select the first server :
- Enter a name for the Namespace :
- Let default and click Next :
- Your brand new Namespace shoud appear :
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… :
- Search and select the second server :
- Click OK to add second server :
- You should now see your two servers as namespace server :
Create Folder Targets
- From DFS Management console, right click to your namespace and choose New Folder… :
- Give a name to your folder and click Add… :
- Click New Shared Folder… :
- Select a folder and click OK :
- Give a name to your Share and click OK, three times :
- Repeat the same procedure in order to create SRV02 folder :
- Once you have your two Folder targets configured, click OK :
- A prompt window will appear asking to automaticaly set replication, as we will do it manually, click No :
- You should now see your Folder targets :
- And should now be able to access to your share via Namespace :
- If you try to create a file from your Namespace you should have a Destination Folder Access Denied window :
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 :
- From General tab, click Share Permissions… :
- Check the boxes to add Permissions rights for everyone, and click OK :
Do the same for the SRV02 entrie.
- Now you should be able to create Files :
- If we have created files on our nameshare we can see that they are present on only one of our two servers :
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.
As we can see on this schema, DFS Replication will allow to synchronize our two Common folders which are localy present on our servers.
- From DFS Management console, right click to Replication and select New Replication Group… :
- Select Multipurpose replication group and click Next :
- Set the replication name :
- From the Replication Group Members click Add… :
- Add our two servers name and click OK :
- Select Full mesh and click Next :
- 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 :
- Set the Primary Server from which we want to replicate to other members :
- 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 :
- Validate by clicking on OK :
- Click Edit to specify the path to the Common folder on the SRV02 server :
- Select Enabled and click on Browse :
- Validate by clicking on OK :
- Finally click Create to create our Replication Group :
- And close the window after checking that all steps have been successfully completed :
- From the DFS Management console, you should now see the Replication Group :
- 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 :
- If you have a uge amount of files to replicate and you want to check the replication status see this : link.