troubleshooting Question

dfsr not replicating all the files

Avatar of dedri
dedriFlag for United States of America asked on
Server SoftwareMicrosoft Server OSPowershellWindows Server 2008Windows Server 2012
6 Comments1 Solution994 ViewsLast Modified:
I have been using DFS/DFSR in our enviornment.
We have two FileServers, which have DFSR configured on a lot of shares, so the data can be replicated.

Now I have a issue with DFSR not replicating all files  and I am lost.

 OS version that are used  2008 R2 Sp1 on both ends, same domain.
   
   For example there is a folder on server A that is replicated to server b. It has a folder Data in it, which is configred through DFSR replication and when I check files in both location I can see that the number of files are different.

Dfsrdiag shows in both directions no backlog, partners in sync. No errors show up.

There is bigger enough staging area in place.  Event shows  nothing - it seems DFS just decided to not replicate those files.

I checked the microsoft article about the latest version of dfsr and installed it(https://support.microsoft.com/en-us/kb/968429). The problem still exist. Some files is not replicated, again no files in backlog.  Files in question do not have replication filters configured. Most of them are standard word or excell files.
After digging a little more deeper I found that the most of the files have attribute set to AT, and T means temporary even though that the file is not temporaray one.
As a workaround I found this article http://ss64.com/nt/attrib.html, which says : DFSR will not replicate files if they have the temporary attribute set.
The temporary attribute can be removed by using PowerShell to subtract 0x100:

PS C:\> Get-childitem D:\Data -recurse | ForEach-Object -process {if (($_.attributes -band 0x100) -eq 0x100) {$_.attributes = ($_.attributes -band 0xFEFF)}}

I tried to run the script on one of the folder unsuccessfully, because on the folder path I have the symbol "&" and it gives me an error message.
Here is the output of the error message:
PS C:\Users\ad0psr> Get-childitem "G:\ITDepartment\ISS$BCP" -recurse | ForEach-Object -process {if (($_.attributes -ban
d 0x100) -eq 0x100) {$_.attributes = ($_.attributes -band 0xFEFF)}}
Get-ChildItem : Cannot find path 'G:\ITDepartment\ISS' because it does not exist.
At line:1 char:14
+ Get-childitem <<<<  "G:\ITDepartment\ISS$BCP" -recurse | ForEach-Object -process {if (($_.attributes -band 0x100) -eq
 0x100) {$_.attributes = ($_.attributes -band 0xFEFF)}}
    + CategoryInfo          : ObjectNotFound: (G:\ITDepartment\ISS:String) [Get-ChildItem], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

Anyone has an idea how to debug this and solve it completely? The best solution will be something that will prevent normal files to be assigned the T attribute, so I will not have to run this script everyday.
I will appreciate also a help with this script, at least as a workaround to this problem.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros