The Storage Team Blog about file services and storage features in Windows and Windows Server.
Our DFSR guru Rob Post recently helped a newsgroup customer troubleshoot why certain .jpg files would not replicate. The customer described the problem as:
Rob asked the customer to check whether the file was generating an entry in the USN journal, which is required to trigger replication. The customer ran the fsutil usn readdata command and posted the results for two files, one that replicates and one that does not. Notice anything different about the results? This is an interesting puzzle, so I’d like to challenge our readers to find out why the file wasn’t replicating and post your guess in the comments. I'll post the answer next week.
Hint: Neither replication engine (DFS Replication or FRS) will replicate the File1.jpg below.
File that failed to replicate:
D:\Data>fsutil usn readdata File1.JPGMajor Version : 0x2Minor Version : 0x0FileRef# : 0x029d000000000b9eParent FileRef# : 0x0002000000000b35Usn : 0x00000000001bccf0Time Stamp : 0x0000000000000000 12:00:00 AM 1/1/1601Reason : 0x0Source Info : 0x0Security Id : 0x106File Attributes : 0x120File Name Length : 0x18File Name Offset : 0x3cFileName : File1.JPG
D:\Data>fsutil usn readdata Dir\File2.JPGMajor Version : 0x2Minor Version : 0x0FileRef# : 0x0002000000000ba4Parent FileRef# : 0x0003000000000ba2Usn : 0x00000000001bdde8Time Stamp : 0x0000000000000000 12:00:00 AM 1/1/1601Reason : 0x0Source Info : 0x0Security Id : 0x106File Attributes : 0x20File Name Length : 0x18File Name Offset : 0x3cFileName : File2.JPG
So readers, why won't the first file replicate?
File1.JPG (failing): File Attributes : 0x120
<br>File2.JPG (working): File Attributes : 0x20
<br>WinNT.h defines the following for file attributes:
<br>#define FILE_ATTRIBUTE_ARCHIVE 0x00000020
<br>#define FILE_ATTRIBUTE_TEMPORARY 0x00000100
<br>So the failing file has (FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_TEMPORARY) while the working file has only (FILE_ATTRIBUTE_ARCHIVE).
<br>Per the documentation:
<br>[<a rel="nofollow" target="_new" href="http://technet2.microsoft.com/WindowsServer/en/Library/1aa249c0-40f3-4974-b67f-e650b602415e1033.mspx">http://technet2.microsoft.com/WindowsServer/en/Library/1aa249c0-40f3-4974-b67f-e650b602415e1033.mspx</a>]
<br>DFS Replication does not replicate the following types of files:
<br>- Files on which the temporary attribute has been set.
<br>The fact that this file does not replicate is therefore by design.