none
Windows Server 2003 R2 - Distributed File System (DFS)

    Question

  • I am having great difficulties with DFS and replication.  It’s great, and awesome but only when you make sure that everyone is connected to the single server. Otherwise you get sharing violations and all hell breaks loose. For example, consider this scenario:
    • Person A opens a spreadsheet X on the network share S and DFS opens a connection to the file on Server 1.
    • Person B opens X on S, and this time DFS tries to do load balancing, and B ends up on Server 2.
    • Both A and B modify the spreadsheet and then save it. No one gets sharing violation errors? What happened?

    DFS does not care about concurrent writes. It simply makes sure that the file with the most recent timestamp is copied over to the other server immediately. So, in a conflict situation, whoever saves last wins.

    What is the solution here?
    Any ideas??

    Wednesday, July 16, 2008 6:38 PM

Answers

  •  

    Hi Chriwall,

     

    Actually, this is the working mechanism and feature of DFS and DFSR.

     

    When accessing DFS folders, the DFS referral mechanism may refer clients to the most appropriate server based on site and cost information. In this way, clients can access DFS targets that are nearest to them and provide good load balance. For example, London’s clients can access the file server in London and HongKong’s clients can access the file server in HongKong.

     

    After you configure multiple DFS targets and enable DFS replication between them, the DFS replication mechanism tries to synchronize the contents between DFS targets. As you mentioned, it is possible that multiple clients may access the same file on different servers at the same time. DFS resolves this conflicts by following a defined rule:

     

    1. fenced file wins

    2. last writer wins (by comparing the update time)

    3. higher UID wins

     

    If all the above is the same, the file with the higher machine part of the GVSN wins (random but unique). One copy of the modification (The winner) will be kept. The loser and their children will be moved into the conflict folder under DFSRPrivate. The conflicts and resolution is recorded in the conflictManifest.xml for future reference.

     

    If you would like all users to connect to a single server, you can configure only 1 DFS target server and DFS root server. In this scenario, you do not need to use the DFS replication feature and only utilize the DFS namespace referral function.

     

    To help you understand DFS and DFS replication better, I have included the following link for your reference:

     

    Distributed File System

    http://technet2.microsoft.com/windowsserver2008/en/library/1f0d326d-35af-4193-bda3-0d1688f90ea71033.mspx?mfr=true

     

    DFSR Replicated Folders

    http://msdn.microsoft.com/en-us/library/bb540026(VS.85).aspx


    Laura Zhang - MSFT
    • Marked as answer by David Shen Thursday, July 24, 2008 9:31 AM
    Tuesday, July 22, 2008 2:02 AM
    Moderator

All replies

  •  

    Hi Chriwall,

     

    Actually, this is the working mechanism and feature of DFS and DFSR.

     

    When accessing DFS folders, the DFS referral mechanism may refer clients to the most appropriate server based on site and cost information. In this way, clients can access DFS targets that are nearest to them and provide good load balance. For example, London’s clients can access the file server in London and HongKong’s clients can access the file server in HongKong.

     

    After you configure multiple DFS targets and enable DFS replication between them, the DFS replication mechanism tries to synchronize the contents between DFS targets. As you mentioned, it is possible that multiple clients may access the same file on different servers at the same time. DFS resolves this conflicts by following a defined rule:

     

    1. fenced file wins

    2. last writer wins (by comparing the update time)

    3. higher UID wins

     

    If all the above is the same, the file with the higher machine part of the GVSN wins (random but unique). One copy of the modification (The winner) will be kept. The loser and their children will be moved into the conflict folder under DFSRPrivate. The conflicts and resolution is recorded in the conflictManifest.xml for future reference.

     

    If you would like all users to connect to a single server, you can configure only 1 DFS target server and DFS root server. In this scenario, you do not need to use the DFS replication feature and only utilize the DFS namespace referral function.

     

    To help you understand DFS and DFS replication better, I have included the following link for your reference:

     

    Distributed File System

    http://technet2.microsoft.com/windowsserver2008/en/library/1f0d326d-35af-4193-bda3-0d1688f90ea71033.mspx?mfr=true

     

    DFSR Replicated Folders

    http://msdn.microsoft.com/en-us/library/bb540026(VS.85).aspx


    Laura Zhang - MSFT
    • Marked as answer by David Shen Thursday, July 24, 2008 9:31 AM
    Tuesday, July 22, 2008 2:02 AM
    Moderator
  • Many thanks for your help on this Laura - much appreciated
    Thursday, July 24, 2008 5:12 PM