22 December, 2010

DFSR Replication Group in Windows 2008 R2

Replication Group: Before we actually start discussing about the various aspect of a Replication Group, It is important to know what exactly is a Replication Group or a RG. A Replication Group is a Logical Name - A Logical Name given to a set of data residing on a set of computers

A Replication Group consist of Replicated Folders that it will replicate and the servers which are hosting those Replicated Folders. The data here in DFSR is again given a logical name - A Replicated Folder. So a Replicated Folder or a RF consist of the actual data that you want to replicate using DFSR

A Replication Group consist of Replicated Folder and the Servers on which we have these Replicated Folders. A Replication Group can have multiple Replicated Folders and multiple Servers. Usually, you will find 1 Replicated Folder Per Replication Group (And that is also a good practice)

The main purpose of creating a Replication Group is to apply different settings on the RF and the Servers involved in Replication Group in one go.

Lets have a look on those settings and various other aspect of a Replication Group

In this Example, we have created a Replication Group named "Data1"

Once you click on a Replication Group, you get four tabs on the right pane
1. Memberships
2. Connections
3. Replicated Folders
4. Delegation


Membership Tab

The membership tab will list the following information:

1. Local Path: The path of the data on the servers
2. Membership Status: Enabled or Disabled
3. Member: The name of the server which are hosting the data and replicating the data
4. Replicated Folder: The name of the folder which has all the data which you are replicating
5. Staging Quota: Size of staging area for that Replicated Folder on a particular member (server)

Select any of the member and do a right Click. You will get the following options:

1. Delete Member
2. Disable
3. Properties

Delete Member: This means that you are removing this particular server from this Replication Group


Once you try to delete the member fro the Replication Group, you do get a warning stating that the server will no longer be replicating the data but the data on the server will NOT be deleted either.


Disable: Now this is very important. You might want to disable the server from this Replication Group and Re-enable it later? Think twice before doing so. Why? Lets see

Suppose we have two servers: Server1 and Server2. Both the servers are replicating 500 GBs of data. You disable the server in the Replication Group and Re-enable it.... What do you think will happen in the background. Once you re-enable the server (suppose server2 is Re-enabled), then Server1 will become Authoritative and Server2 will become Non-Authoritative for this Replication Group.

Suppose we have exactly the same data between both the servers. Even then, when you Re-enable the Replication, Server2 will try to "At least" compare the 500 GB data with the data that is there on Server1.

What if we had some most upto date data on Server2? Oops... That will be LOST because now Server2 have become "Non-Authoritative" for this Replication Group


An important point to know here is that You do get a warning prompt while you do try to disable the server in the Replication Group. The warning clearly tells you that if you want to PAUSE the replication the use the other option (Which we will discuss later in the same post). But the point to know is that this is NOT a place to "Pause" the replication. (Advice - Do take proper backup of "Both" the servers involved in replication before you disable and Re-enable the server)

Also, as stated that when two servers are involved in replication and you disable one of the server than automatically the other server becomes "Authoritative" when you re-enable replication on the disabled server

But what if we have multiple servers involved in Replication? Then any of the other servers remained in the Replication Group will become Authoritative when you Re-enable the disabled server.


Once you disable the server in the Replication Group, you will also get Event ID 4114 stating that replication has been disabled on this server for this Replication Group

Few Microsoft link that you can also read while reading this to get some information:

Recovering from Unsupported One-Way Replication in DFSR Windows Server 2003 R2 and Windows Server 2008
http://blogs.technet.com/b/askds/archive/2009/06/23/recovering-from-unsupported-one-way-replication-in-dfsr-windows-server-2003-r2-and-windows-server-2008.aspx

Recovering from data corruption on volumes where replicated files are stored
http://blogs.technet.com/b/filecab/archive/2006/05/31/429919.aspx



Event ID 4114


Now lets try to Enable the Replication


Note: It did not Enabled the Replication just like that. Its asking me for a path of the Replicated Folder!!! Now the moment I enable the Replication, all the data that was stored on this server for the Replication Group, will move into "Pre-Existing" and then a comparison will start with the other server. The data which is same on both the servers will of course not replicate, only the file hashes will be compared and if found identical, then the files from the "Pre-Existing" will be moved out else, if the hash of the file has been changed for any reason, then the file will be replicated from the other server



Lets go into the properties of a server in the membership Tab. There are 4 tabs available:
1. General
2. Replicated Folder
3. Staging
4. Advanced

General: Only read only information about the Member, Domain, Site and Replication Group will be available here


Replicated Folder: Only Read only information about name of the RF, Location of the RF and its membership status


Staging: Location from where you can change the path of the Staging Files (<Volume>:\<RG Name>\DFSRPrivate\Staging) and the size (4096 MB = 4 GB)


Advanced: The path of "ConflictAndDeleted" cannot be changed (<Volume>:\<RG Name>\DFSRPrivate\ConflictAndDeleted) but the size of the folder can be changed (660 MB Default)

Move Deleted files to Conflict and Deleted Folder: When ever a file is deleted because of a conflict, then the file on the loosing server goes into "ConflictAndDeleted" folder so that in case we want to recover the file, then we can. This happens because the box "Move Deleted files to Conflict and Deleted Folder" is checked. If we uncheck this box, then the file will be deleted instead of getting moved into this folder. Also, remember, there is a limit that has been defined here which decides how much data this folder can store (Default: 660 MB)


Connections Tab
This page will give the following information's:
1. Sending Member: Name of the Sending Member which is Sending the data
2. Sending Site: Name of the Site in which this Sending member is located
3. Connection Status: Enabled/Disabled
4. Receiving Member: Name of the Receiving Member which is Receiving the data
5. Schedule Type: Which schedule is defined for this member i.e when this member will replicate data with the other member

Select any of the member and do a right Click. You will get the following options:

1. Disable
2. Replicate Now
3. Properties
4. Delete

Disable: Disabling the connection is not equivalent to disabling the member from the "Membership" tab. When you disable the member from the membership tab and then Re-enable the member, then that member becomes "Non-Authoritative" for that Replication Folder. But when you disable the member from the "Connection" tab, then it just disables the connection "TEMPORALLY" and when you re-enable the member, then it does NOT makes the member as Non-Authoritative. It Just "Stops" the replication for this Replication Folder for the time till the connection is disabled



Enable: Note that when we enable the connection, it does not give us any warning/event nor any option of the path of the Replicated Folder which it used to give when enabled the member from the membership tab



Replicate Now: Quite obvious... It will force DFSR to replicate the data at that instance of the time else DFSR would have replicated the depending upon the schedule defined



Properties:
1. General Tab
2. Schedule Tab


 General Tab

- Enable Replication on the Connection: By default, this option is checked. If unchecked, the replication on this member will be disabled

- Use Remote Differential Compression (RDC): By default RDC is enabled, although you can disable RDC using this option


Schedule Tab

Every Replication Group has a Schedule defined. The Replicated Folders (or these members/connections) inherit the schedule that is defined on the Replication Group Level. We will discuss the schedule defined on the Replication Group later in this post

In case you do not want this member/connection to inherit the default schedule from the Replication Group, then you can use the option "Custom Connection Schedule"


Replicated Folders Tab

1. Replicated Folder: Name of the Replicated Folder

2. Publication Status: The main difference between DFS(FRS) and DFSN(DFSR) is that in DFS we had to create a root/link for the data that we wanted to replicate. In DFSR, we do not have to create the namespace for the data that we want to replicate. We just need to create the Replication Group without creating the Namespace. Now in the example below, the "Publication Status" is set to "Not Published". The reason being that we only have the Replication Group for the Replicated Folder "Data1" but we don't have any a corresponding namespace for this Replication Group

3. Namespace Path: This will display the path of the namespace for this Replication Group. As stated before, since we do not have any namespace defined for this Replication Group, hence forth, we do not have any path defined in this location


Lets publish this namespace. Right click and chose the option "Share and Publish in Namespace"


Share and Publish the Replicated Folder in the Namespace
Share the Replicated Folder

Since we want to publish the Replicated Folder in the Namespace, hence we will chose the first option


Here you can select which all Replicated Folders should be Published


Parent Folder in Namespace: This means under which namespace you want to publish your Replicated Folder

New Folder Name: You can choose the same name as that of the Replicated Folder name or you can give another name. Remember, this is the name that the users will be using to access the data. So if you have the root namespace as \\Contoso.com\MyRoot and the actual name of the replicated folder is Data1, but here if you give the name of the folder as Data then users will be suing \\Contoso.com\MyRoot\Data instead of \\Contoso.com\MyRoot\Data1 even though in the background the real name of the folder is Data1


Also, as stated above, you need to choose the name of the Root namespace in which this Replicated Folder will be published. You can use an existing namespace or you can create a new namespace here in this wizard as well


I have used an existing namespace (\\Net.com\MyRoot) where the replicated folder will be published. Also, I have not changed the name of the folder (Data1)



Success.....


Now I can view the Replicated Folder in the namespace. that mean, now my users can access the data
Remember, till now since I have configured only the Replication group, my data was ONLY getting replicated. it was not accessible. But now since I have created the namespace for that data is accessible to users as well

DFSN - To access the data
DFSR - To replicate the data



Now lets go into the properties of the Replicated Folder


1. General tab
2. Namespace Tab

General Tab

- Name of the Replicated Folder
- Description
- File Filter: By default, "~, bak and tmp" type of files does not replicate through DFSR. In case you want 
   to replicate these type of file or wants to deny some other kind of files, then make the changes here
- SubFolder Filter: You can add the name of the sub folders that you don't want to get replicated using  
   DFSR


Namespace Tab

Namespace Path: Path of the Namespace


Deleting the Replicated Folder


While deleting the Replicated Folder, you get an option to either "Delete the Replicated Folder and Remove it as a Folder Target in the Namespace" or "Delete the Replicated Folder only"




Right Click on the Replication Group and got the following options:

1. New Member
2. New Replicated Folders
3. New Connection
4. New Topology
5. Create Diagnostic Report
6. Verify Topology
7. Delegate Management Permissions
8. Edit Replication Group Schedule
9. Remove Replication Group from Display
10. Properties



Replication Group Property

- Name of the Replication Group
- Description
- Edit Schedule: As discussed earlier, we have a schedule that we can define here at the Replication Group
   level and another schedule that can defined for each Replicated Folder. By default, The Replicated Folders
   (or these members/connections) inherit the schedule that is defined on the Replication Group Level