Keeping an eye on DFS-R

I’ve never really used DFS-R with many file servers but here I am. And the company I work with has been having issues with replication since a member had been taken offline and back.

Due to maintenance they had disabled the member from the namespace servers of that namespace and disabled it from the memberships. When the server was up again, they re-enabled memberships for DFS and replication accordingly

To me, it seems like a good idea but somehow this member is now having issues. Nothing gets in or out as for replications go.

First of, there are a few essential reads for DFS-R. I really recommend spending some time reading those as a refresher or even guidance.

http://blogs.technet.com/b/askds/archive/2007/10/05/top-10-common-causes-of-slow-replication-with-dfsr.aspx

http://blogs.technet.com/b/askds/archive/2010/11/01/common-dfsr-configuration-mistakes-and-oversights.aspx

Also I highly recommends this article shall you want to remember what is means to be a member of the Replication Group.

http://www.adshotgyan.com/2010/12/dfsr-replication-group-in-windows-2008.html

 

Here we go. I just want to share a few things I do and look for when I starting looking for troubles.

Check the Health of a Replication Group (RG)

dfsradmin health new /rgname:RG_NAME /refmemname:FROM_THE_VIEW_OF_WHICH_MEMBER /domain:YOUR_DOMAIN /ReportName:c:\scripts\dfsmonitor\health\RGNAME_health_rpt.html

This report will tell you what is it doing and if it encountered any errors without having to parse the event logs. Shall you want to automate this, have a look at this basic script.

Do a file replication/propagation test

dfsrdiag offers many options, one of them is to test propagation of a file to the various members of the RG. You would do the following

dfsrdiag.exe propagationtest /rgname:RG_NAME /rfname:REPLICATION_FOLDER_TO_TEST /testfile:A_FUNNY_NAME

Operation Succeeded

You then will want to wait a little bit for things to happen and after a few minutes verify what has happened with the propagationreport option.

dfsrdiag.exe propagationreport /rgname:RG_NAME /rfname:REPLICATION_FOLDER_TO_TEST /testfile:A_FUNNY_NAME /reportfile:c:\scripts\dfsmonitor\propagationtest.xml

PROCESSING MEMBER A[1 OUT OF 3]
PROCESSING MEMBER B[2 OUT OF 3]
PROCESSING MEMBER C[3 OUT OF 3]

Total number of members: 3

Number of disabled members: 0

Number of unsubscribed members: 0

Number of invalid AD member objects: 0

Test file access failures: 0

WMI access failures: 0

ID record search failures: 0

Test file mismatches: 0

Members with valid test file: 3

Operation Succeeded

Verify backlogs

>dfsrdiag.exe backlog /rgname:RG_NAME /rfname:REPLICATION_FOLDER_TO_TEST /smem:SOURCE_MEMBER /rmem:TARGET_MEMBER

This will give the number of files in the queue and will list them if you wish. This said it will only output 100 by default.

You can also use this script in order to keep track of the backlogs.

Restart the DFS-R service

If things seems stuck after you checked everything above and the DFS-R log usually located in c:\windows\debug\log. You might want to restart the service once

Get-Service *dfsr* | Restart-Service

WARNING: Waiting for service ‘DFS Replication (DFSR)’ to finish stopping…

Get-Service *dfsr*

Status   Name               DisplayName

—–   —-               ———–

Running DFSR               DFS Replication

In the end

If you have read all this and still not sure how to fix your replication issues: contact microsoft. Any mistake while playing with members and their RGs may render files inaccessible for your users. This said I am yet to find a good way to monitor all of my RGs beside loading those health reports. I wish there was a better way to check what is going on, what files it is working on, the queues, the state of the members and so on in a single MMC.

I also want to list here a few other article that may help troubleshooting and recreating your RGs.

Clearing Conflits and Deleted folders

http://blogs.technet.com/b/askds/archive/2008/10/06/manually-clearing-the-conflictanddeleted-folder-in-dfsr.aspx

Preseeding another member

http://blogs.technet.com/b/askds/archive/2010/09/07/replacing-dfsr-member-hardware-or-os-part-2-pre-seeding.aspx

 

 

#dfs, #dfs-n, #dfs-r, #dfsn, #dfsr, #propagation, #replication, #server, #windows-2