How to move DFS replicated (DFSR) folders
Distributed File System (DFS) is a technology introduced by Microsoft as add-on on Windows NT 4.1 and then included as standard component on all Windows 2000 server editions. It is a set of client and server services that allow an organization using Microsoft Windows servers to organize many distributed SMB file shares into a distributed file system.
DFS provides location transparency and redundancy to improve data availability in the face of failure or heavy load by allowing shares in multiple different locations to be logically grouped under one folder, or DFS root.
DFS supports the replication of data between the servers, using File Replication Service (FRS) in server versions up to Server 2003, and using DFS Replication (DFSR) in Server 2003 R2, Server 2008, and later versions. DFSR improves on FRS by only copying those parts of files which have changed (remote differential compression).
We are going to see how to move a DFSR folder to a new location. In that process we are going to consider that our folder needs to be moved from the D:\ to H:\ so we will need to move it or create a replica, then pre-seed it from an upstream server and then add it to the replicated group again, so let’s see it in detail.
First of all we need to remove the folder from the replicated group in order to stop replication from partners and update the folder’s absolute path in there. We will do it from the DFS Management Console.
- Click Start, point to Administrative Tools, and then click DFS Management.
- In the console tree, under the Replication node, click the replication group that contains the membership you want to remove.
- In the details pane, click the Memberships tab.
- Select the replicated folder on the specific member, and then click Delete.
- Choose to delete Replicated folder and DFS Link.
At this point we need to pre-seed (also known as pre-stage) our folder on H:\. For that purpose, and depending on your operative system you need to do it with NTBackup or Robocopy.
- Windows Server 2008 R2 Robocopy (KB979808 or later)
- Windows Server 2008 Robocopy (KB973776 or later)
- Windows Server 2003 R2 use NTBackup
It is not recommended that you pre-seed a new Windows Server 2003 R2 computer using Robocopy as there are known pre-seeding issues with the version included in the out-of-band Windows Resource Kit Tools. These issues will not be fixed as Win2003 is out of mainstream support. You should instead use NTBackup as said before.
-
Sync the folders using Robocopy with the following argument format:
**_
Robocopy.exe “\\source server\drive$\folder path” “destination drive\folder path” /b /e /copyall /r:6 /xd dfsrprivate /log:robocopy.log /tee_**
-
Validate you pre-seeding with DFSRDiag tool (included on RSAT for Windows 7).
-
Note the path of six files within the source data server. These should be scattered throughout various nested folder trees.
-
For one of those test files, use DFSRDiag to get a hash from the source computer and the matching file on the pre-seeded computer:
**_DFSRDIAG.exe filehash /path:”source path file”
_****_DFSRDIAG.exe filehash /path:”pre-seeded path file”_**
-
If it shows the same hash value for both copies of the file, it has been pre-seeded correctly and matches in all file aspects (data stream, alternate data stream, security, and attributes). If it doesn’t match, you made a mistake in your pre-seeding or someone has changed the files after the fact. Start over.
-
Re-add folder to the replication group:
- In the console tree of the DFS Management snap-in, right-click the Data Distribution replication group, and then click New Member.
- Follow the steps in the New Member Wizard and supply the information.
- Click OK to close the dialog box that warns you about the delay in initial replication.
And that’s it. This procedure is also valid when replacing an entire member on a replication group (i.e. server replacement).
You can find more information on the links below:
- Description of the Distributed File System (DFS) Management snap-in in Windows Server 2003 R2 (Microsoft Support)
- DFS Step-by-Step Guide for Windows Server 2008 (TechNet)
- How DFS Works (TechNet)
- Get out and push! Getting the most out of DFSR pre-staging (DS Team Blog)
- Replacing DFSR Member Hardware or OS (DS Team Blog)