22 December, 2010

Configuring DFSR In Windows 2008 R2 - Part 1

Distributed File System Replication (DFSR)

Introduced in Windows 2003 R2, the main goal of this service (Indeed the Engine) was to replace the File Replication Service (FRS) gradually...

But why to replace File Replication Service...?

FRS has some major drawbacks which has been taken care of in DFSR

1. Journal Wrap: While FRS use to go into the Journal Wrap condition quite often, DFSR on the other hand is self healing in terms of Journal Wrap

2. Morphing: Conflict Resolution was not that smart in FRS which has been greatly redefined in DFRS
Besides the above two points, we do have much more which DFSR can supports but not FRS


1. Replicated Folder (RF): The actual folder containing data that we replicate (Like C:\UserData). The Replicated Folder will be stored on the file system

2. Replication Group (RG): The Group that will contain the Replicated Folder. We can give any logical name to the RG. It need not necessary the same as that of RF. It is not stored in the file system. It is stored in AD. Remember, it is just a logical name give to one/multiple RF that we want to replicate. We can have multiple RFs in one RG...

So lets move on to a 3 Part Series on DFSR.....

Note: Before you start reading this post, please read the following post on DFSN as this DFSR Part 1 will start where DFSN Post Ends.... (http://www.adshotgyan.com/2010/12/configuring-dfsn.html)

We have already created a Namespace (\\Net.com\MyRoot) with two Referral on two servers and in the Namespace we have a Folder (MyLink1) again with two referrals on two servers. Kindly note, that we have not Enabled "Replication" on the Link as of now...

Since Replication is not enabled on this link, hence forth we do not see anything in the Replication Tab when we click on the Replication Group

There are different ways of creating a Replication Group (RG). Right now, since we do have a Folder {MyLink1} that has two referrals, we will therefore create a RG for this Folder

1. On the Replication Tab, You have an option to "Configure Replication" using the "Replication Folder Wizard"

2. Right click on the Folder in the Namespace, and choose the option "Replicate Folder"

In both the scenario, we will get the same Wizard. The Wizard will show the name of the RG and RF. You can change the name of the RG as it is just a logical name but you cant change the name of the RF as this is the actual folder which contains data and which exist on the file system

It ask you to select a "Primary Member". This is an important decision to be made when you have data already existing in the folders that you are trying to replicate. Once you select a server as "Primary", that server will become authoritative for the data. Once we have the data in sync on both the servers, then both servers are at par. None of the server will remain authoritative once the data is in sync.

Lets take an Example. We have Server1 and Server2 which has the data in "C:\UserData"
On Server1, We have File1, File2 and File3
On Server2, We have File 4, File5 and File 6

We enable replication between the two servers and made Server1 as "Primary"
Now the effect of making Serevr1 as Primary would be that all the Files on Server2 will be discarded and Server2 will take the files from Server1 (File1, File2 ad File3) there by loosing the Files (File4, File5 and File6)

But as I have said before, once the Initial Replication is completed and we have File1, File2 ad File3 on both the server, now since both the servers as at par, in we add a file on Server2, it will replicate to Server1 and vice verse.

But having said all this, I would again like to reiterate the fact that in case it is a new setup and we do not have any data then you can make any server as "Primary"

Here I have made "Win2k8-DC1" as a "Primary" Server

Before we move on with the wizard, I would like to show you the data lose that I just Explained

We have 2 Servers in this Lab on which we acre currently working on... Win2k8-DC1 and Win2k8-DC2

The name of the RF is: C:\MyLink1

On both the servers, I have created a folder with the name of their servers.

On Win2k8-DC1, I have created a folder with the name "Win2k8-DC1" in "C:\MyLink1"
On Win2k8-DC2, I have created a folder with the name "Win2k8-DC2" in "C:\MyLink1"

Lets come back to our wizard...

There are 3 types of topologies that is supported by DFSR:
1. Hub and Spoke
2. Full Mesh
3. No Topology (Custom)

Note: Currently, Hub and Spoke topology option is greyed out. Reason - Hub and Spoke topology need at least three servers in Replication. We cannot configure Hub and Spoke topology with 2 servers involved in Replication

Bandwidth Throttling: A new feature of DFSR where in you can not only specify the time in day during which the replication will take place but also the bandwidth that it will use during that time...Cool

We can create a schedule during which the replication will take place and again we can specify how much bandwidth it will consume at that time

Replication Group (RG) Created.... Just a message displaying that since the information of RG is stored in AD so it might take some time before all the DFSR servers polls AD to get this new configuration information and display the newly created "Replication Group"

Since now a RG for the corresponding Folder in the Namespace has been created, If I click on the Folder in the Namespace then I will see that the Replication Tab is now populated with the name of the RF

Click on the RG and you will find 4 Tabs on the Right Pane

1. Memberships
2. Connections
3. Replicated Folders
4. Delegation

Memberships: This will show who all are the members of this RG

Connections: This will show the connection (One Way / Two Way) between those Members in the RG

Remember that One Way Replication is not supported in Windows 2003 R2 and in Windows 2008. It is only supported in Windows 2008 R2

Replicated Folders: The name of the folder which is getting Replicated

Delegation: Who all have permissions on this RG

Lets now go into the file system and see the changes that happened after we created the RG...

If you can recall, we have done the following few minutes back..
On Win2k8-DC1, I have created a folder with the name "Win2k8-DC1" in "C:\MyLink1"
On Win2k8-DC2, I have created a folder with the name "Win2k8-DC2" in "C:\MyLink1"

Lets see what all do we have in these folders are creating the RG...

We are currently on Win2k8-DC1, and we can see that we still have the folder "Win2k8-DC1" in "C:\MyLink1". This happened because we made the server Win2k8-DC1 as "Primary"

Expanded View of the Folder....

We are now on Win2k8-DC2, and we can see that we have the folder "Win2k8-DC1" in "C:\MyLink1". But I thin we have created a folder with the name "Win2k8-DC2"... Yes you guessed it correctly...

This happened because we made the server Win2k8-DC1 as "Primary" and the server Win2k8-DC2 was suppose to take all the data from Win2k8-DC1...

But what happened to the data that Win2k8-DC2 had ? Lets see

Expanded View of the Folder on Win2k8-DC2...
Do we see any difference between this and the one on Win2k8-DC1...?

Yes we do... On the server which we made as "Non-Primary" and which had the data, we can see an "Extra" folder with the name "Pre-Existing"

Pre-Existing Folder will contain all the data that this server had before the Replication was Enabled. You will find the folder Pre-Existing on the Non-Primary or Non-Authoritative Server Only...