SYSVOL Migration Tool Actions
Updated: April 15, 2009
Applies To: Windows Server 2008, Windows Server 2008 R2
This appendix describes in detail the steps taken by the migration tool (DfsrMig.exe) and the Distributed File System (DFS) Replication service during the different phases of the SYSVOL migration. You can use this information to help troubleshoot issues that occur during migration.
For information about migration states and the different phases of SYSVOL migration, see SYSVOL Migration States. For more information about troubleshooting SYSVOL migration, see Troubleshooting SYSVOL Migration Issues.
Migrating to the Prepared state
The goal of migrating SYSVOL replication to the Prepared state is to configure the DFS Replication service to replicate a copy of the original SYSVOL folder. When all domain controllers reach the Prepared state, DFS Replication is properly configured and it has completed an initial synchronization. If any domain controller fails to reach the Prepared state, you must diagnose and correct the issue. In the Prepared state, the replication of the SYSVOL shared folder still depends on the File Replication Service (FRS).
For information about the steps that you must perform to migrate SYSVOL replication to the Prepared state, see Migrating to the Prepared State.
During the migration to the Prepared state, the migration tool and DFS Replication service perform the following actions when the DFS Replication service notices the migration directive in AD DS that indicates that the global migration state has changed to Prepared:
The migration tool creates and populates the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\DFSR\Parameters\SysVols\Migrating SysVols registry key, which contains the value of the local migration state for that domain controller. The migration tool also sets the local migration state to Preparing (4).
The DFS Replication service creates the %WINDIR%\SYSVOL_DFSR folder to serve as a copy of the %WINDIR%\SYSVOL folder (where %WINDIR% is the folder in which Windows is installed).
The DFS Replication service also copies the domain subfolder of the SYSVOL folder to the new SYSVOL_DFSR folder and replicates the permissions for the SYSVOL folder to the SYSVOL_DFSR folder. The DFS Replication service does not copy the Staging and Staging Areas subfolders to the new SYSVOL_DFSR folder.
To complete the migration successfully, the volume that hosts the SYSVOL folder must have enough space to also host a copy of that folder.
The DFS Replication service uses the robocopy command to copy the contents of the %WINDIR%\SYSVOL\domain folder to the %WINDIR%\SYSVOL_DFSR\domain folder. The output of the robocopy command is saved in %WINDIR%\Debug\DFSR CopyLog*.txt.
Note
The DFS Replication service replicates all files and folders under the %WINDIR%\SYSVOL_DFSR\domain folder only.
The DFS Replication service creates the SYSVOL junction point under %WINDIR%\SYSVOL_DFSR\sysvol. This junction point maps to the %WINDIR%\SYSVOL_DFSR\domain folder.
The DFS Replication service creates global objects and settings in AD DS. These settings configure the DFS Replication service to run on the domain controller and replicate the %WINDIR%\SYSVOL_DFSR folder among its peer domain controllers. On the PDC emulator, the DFS Replication service creates member objects in AD DS for each read-only domain controller that exists at that time.
The DFS Replication service sets the local migration state to Waiting for initial sync (5).
The DFS Replication service performs an initial synchronization of the %WINDIR%\SYSVOL_DFSR folder among the domain controllers and adds entries for all files in this folder to its database.
The DFS Replication service sets the local migration state to Prepared (1) when the initial synchronization finishes.
During the migration to the Prepared state, the local migration state on each domain controller moves though the intermediate states Preparing (4) and Waiting for initial sync (5) before reaching the Prepared state (1). After all domain controllers reach the Prepared state, you can proceed to migrate to the Redirected state.
When you roll back this migration phase by setting the global migration state back to Start (0), the DFS Replication service carries out this set of migration steps in reverse and deletes the %WINDIR%\SYSVOL_DFSR folder. Between the Prepared state (1) and the Start state (0), rollback proceeds through the Undo preparing transition state (9).
Migrating to the Redirected state
The goal of migrating SYSVOL replication to the Redirected state is to map the live SYSVOL share folder from the old SYSVOL folder that FRS replicates to the new copy of the SYSVOL folder that the DFS Replication service replicates. From this point onward, SYSVOL replication depends on DFS Replication.
For information about the steps that you must perform to migrate SYSVOL replication to the Redirected state, see Migrating to the Redirected State.
During the migration to the Redirected state, the DFS Replication service performs the following actions on every domain controller when the DFS Replication service notices the migration directive in AD DS that indicates that the global migration state has changed to Redirected:
Sets the local migration state to Redirecting (6).
Updates the contents of the %WINDIR%\SYSVOL_DFSR folder on the PDC emulator to match the contents of the %WINDIR%\SYSVOL folder.
The DFS Replication service performs this update because the SYSVOL and SYSVOL_DFSR folders can become unsynchronized if you make any Group Policy changes after migration to the Prepared state. This occurs because Group Policy changes during this phase of migration only affect the SYSVOL shared folder that FRS replicates and not the SYSVOL_DFSR folder that DFS Replication replicates.
The DFS Replication service only updates the contents of the SYSVOL_DFRS folder on the PDC emulator, because DFS Replication then replicates these changes to the other domain controllers.
Sets the value of the HKEY_LOCAL_Machine\System\CurrentControlSet\Services\Netlogon\Parameters\SysvolReady registry entry to 0 (false), which causes the Netlogon service to stop sharing the SYSVOL shared folder on the domain controller.
Sets the SYSVOL shared folder path and the value of the HKEY_LOCAL_Machine\System\CurrentControlSet\Services\Netlogon\Parameters\Sysvol registry entry to the %WINDIR%\SYSVOL_DFSR folder. This operation redirects SYSVOL replication from FRS to DFS Replication.
Sets the value of the HKEY_LOCAL_Machine\System\CurrentControlSet\Services\Netlogon\Parameters\SysvolReady registry entry to 1 (true), which causes the Netlogon service to resume the sharing of the SYSVOL shared folder.
Adds a dependency so that directory services depend on the DFS Replication service. This step ensures that the DFS Replication service starts with directory services when the domain controller reboots.
Sets the local migration state to Redirected (2).
From this point onward, the SYSVOL shared folder that the domain controller advertises maps to the copy of the SYSVOL folder that DFS Replication replicates.
During migration to the Redirected state, the local migration state on each domain controller moves though the Redirecting transition state (6) before reaching the Redirected (2) state. After all domain controllers reach the Redirected state, you can proceed to migrate to the Eliminated state.
When you roll back this migration phase by setting the global migration state back to Prepared (1), the DFS Replication service carries out this set of migration steps in reverse. Between the Redirected state (2) and the Prepared state (1), the rollback proceeds through the Undo redirecting transition state (8).
When the domain controllers remain in the Redirected state for an extended period of time, any Group Policy changes made during that time are reflected only in the %WINDIR%\SYSVOL_DFSR folder. The original %WINDIR%\SYSVOL folder that FRS still replicates does not remain synchronized with the %WINDIR%\SYSVOL_DFSR folder. When you roll back migration to the Prepared state, the DFS Replication service resynchronizes the contents of the original SYSVOL folder with the contents of the SYSVOL_DFSR folder on the PDC emulator. FRS then replicates these updates to the SYSVOL folder on the other domain controllers.
You can also roll back migration to the Start state (0) from the Redirected state (2). In this case, roll back proceeds through the Undo redirecting transition state (8) and the Undo preparing transition state (9) before reaching the Start state (0).
Migrating to the Eliminated state
The goal of migrating SYSVOL replication to the Eliminated state is to delete the FRS SYSVOL replica set and to delete the old SYSVOL folder.
For information about the steps that you must perform to migrate SYSVOL replication to the Eliminated state, see Migrating to the Eliminated State.
The DFS Replication service performs the following actions on every domain controller when the DFS Replication service notices the migration directive in AD DS that indicates that the global migration state has changed to Eliminated:
Sets the local migration state to Eliminating (7).
Removes the dependency between directory services and FRS.
Stops FRS if it is running on the domain controller, and then deletes the AD DS settings and objects that FRS requires to replicate the SYSVOL shared folder between domain controllers.
Deletes the %WINDIR%\SYSVOL folder that FRS previously replicated. If a user has the folder open at the time of migration, DFS Replication does not delete the folder because of sharing violations, but it deletes all of the files in the folder that are not open.
Restarts the FRS service if FRS was replicating content sets other than the SYSVOL folder on the domain controller.
Sets the local migration state to Eliminated (3).
From this point onward, the SYSVOL shared folder that the domain controller advertises maps to the copy of the SYSVOL folder that DFS Replication replicates, and FRS no longer replicates any copy of the SYSVOL folder on the domain controller.
During the migration to the Eliminated state, the local migration state on each domain controller moves though the Eliminating transition state (7) before reaching the Eliminated state (3).
After SYSVOL migration reaches the Eliminated state, you can no longer roll back the migration.
Additional references
Troubleshooting SYSVOL Migration Issues
Migrating to the Prepared State
Migrating to the Redirected State