The 9 DFS-R States
-
START(stable state 0) designates the initial point of the migration. At this stage, it is critical to make sure that both Active Directory and FRS-basedSYSVOLreplication function properly. To test the former, use theRepAdmincommand line utility (with/showrepl /allor/replsumswitches). To verify status of the latter, take advantage of such utilities as FRSDiag, Sonar, or Ultrasound, which is available from the Microsoft Download Center. Make sure that the DFS Replication service is running and configured with Automatic startup on each domain controller. Confirm that the domain operates on the Windows Server 2008 functional level (which implies that all domain controllers are running Windows Server 2008). Verify that all domain controllers function properly and are accessible, paying particular attention to the PDC Emulator (as a matter of fact, you might want to consider running the migration directly from its console). Avoid adding new domain controllers or introducing changes toSYSVOLfor the duration of the migration. If you decide to install a Read Only Domain Controller after the domain reaches thePREPAREDstate, you will need to manually create its DFS-R specific Active Directory settings by executingDFSRMig /CreateGlobalObjectscommand.
Read More About Windows Server 2008Finally, make sure that every volume containing
SYSVOLfolder on each domain controller has a sufficient amount of disk space (at a minimum, it should be capable of holding its copy). Once you have confirmed that all prerequistes are satisfied, enter thePREPARINGtransitional state by executingDFSRMig /SetGlobalState 1command while logged on with an account that is a member of the Domain Admin (or Enterprise Admin) group. Note that although it is possible to perform the migration by specifying the final value of 3, representing theELIMINATEDstate, such approach is not recommended since it does not provide rollback capabilities). -
PREPARING(transitional state 4) starts with creation of the DFS-R Global Settings objectCN=DFSR-GlobalSettings(and its child objects) under the System container of the default naming context in Active Directory (the change takes place on the PDC Emulator and propagates afterwards via standard AD replication to other domain controllers). ItsmsDFSR-Flagsattribute is used throughout the migration to serve as an indication of the current global status (its value is derived from themsDFSR-Flagsattribute of theCN=dfsr-LocalSettingschild object of each domain controller computer account (which also gets created when thePREPARINGstate starts and is updated throughout the migration to reflect status of individual domain controllers). Other settings (underCN=DFSR-GlobalSettings) are used to designate replication content and topology ofSYSVOL_DFSRamong all domain controllers. Note that PDC Emulator is also responsible for all necessary objects specific to all Read Only Domain Controllers residing in the same the domain (since such changes can not be applied directly to Active Directory database hosted on each RODC). DFS-R service also createsSYSVOL_DFSRfolder on the same volume as theSYSVOLand duplicates the content (leveragingrobocopyutility) of itsdomainsubfolder (including permissions and junction points). This is intended to minimize time and bandwidth required to complete initial DFS-R based replication with other domain controllers (which takes place in theREDIRECTINGstate). The current state of migration gets registered using theLocal Stateentry ofREG_DWORDdatatype underHKLMSystemCurrentControlSetServicesDFSRParametersSysVolsMigrating SysVolsregistry key. -
WAITING FOR INITIAL SYNC(transitional state 5) follows automatically thePREPARINGstate. It is designed to complete configuration of theSYSVOL_DFSR, including its synchronization with another writable domain controller and setup of the corresponding Jet database. Effectively, once this step successfully completes, there are two separate replication mechanisms, with the FRS handling the originalSYSVOLand DFS-R synchronizing itsSYSVOL_DFSR-based duplicate. During its execution, the value ofLocal Stateregistry entry on each domain controller changes from 4 to 5. -
PREPARED(stable state 1) is characterized by existence of two independently replicated instances ofSYSVOL, with FRS as the primary replication engine, handling the content available via theSYSVOLshare and DFS-R managing its non-shared duplicate residing in theSYSVOL_DFSRfolder. In order to confirm whether this stage has been reached (which coincides with the event id 8014 registered in the local DFS Replication Event Log), examine output of theDFSRMig /GetMigrationStatecommand, which queries migration state information from all domain controllers and displays the outcome, identifying any that have not reached the migration state set on the PDC Emulator. Remember that such discrepancies should be remediated before you proceed further. Note also that it is possible to manually expedite migration process. This can be done by forcing AD replication (to propagate changes to the globalmsDFSR-Flagsattribute) withrepadminutility (by leveraging itsreplicateorSyncAllswitches). It is also possible to force DFS Replication service to discover the newly applied global migration settings by executingDFSRDiag PollADwith Member attribute pointing to the PDC Emulator. Once you confirm that thePREPAREDstate is consistent across the domain, you are ready to proceed to the next step by launching theDFSRMig /SetGlobalState 2command. -
REDIRECTING(transitional state 6) starts by synchronizing content of theSYSVOLand its DFS-R equivalentSYSVOL_DFSRon the PDC Emulator (which subsequently replicates to other domain controllers). This is done to account for any changes that might have taken place (typically introduced via Group Policy modifications) since thePREPAREDstate has been reached. Next, theSysvolReadyentry underHKLMSystemCurrentControlSetServicesNetlogonParametersregistry key is set to0(translating into booleanFALSE), which effectively prevents theSYSVOLfrom being shared. This action is followed by changing the value ofSYSVOLshare Path parameter toSYSVOL_DFSRsysvol. Finally,SysvolReadygets set back to1(corresponding to the booleanTRUE), which reinstates theSYSVOLshare (but associated with the new file system location). In addition, the Active Directory Domain Services service is added to the list of dependencies of the DSF Replication service (along with the File Replication service). -
REDIRECTED(stable state 2) is somewhat similar toPREPARED, since bothSYSVOLreplication mechanisms are still active, with DFS-R handling replication of theSYSVOL_DFSRfolder and FRS being responsible forSYSVOL. However, theSYSVOLshare no longer points to the legacy location but instead provides access to theSYSVOL_DFSRsysvolfolder. As the implication of this arrangement, any direct changes to the originalSYSVOLfolder should be avoided, since they will be lost once you perform remaining migration steps (note, however, that this concern does not apply to modifications applied via Group Policy Management Console, which properly points to the new shared location). As before, you can confirm the status of transition by reviewing output generated by theDFSRMig /GetMigrationStatecommand (successful outcome is also be reflected by an event ID 8017 recorded in the DFS Replication event log on each of domain controllers and the value ofLocal Stateregistry entry referenced by us earlier). For more in-depth troubleshooting, useDFSRMig_xxx.Log.gzfiles residing in theDebugsubfolder underWindowsfolder (where xxx is sequentially assigned integer value). This verification is critical, since the next step is non-reversible (the only way to return your domain from theELIMINATEDtoSTARTstate is the full domain restore). Once you are ready, execute theDFSRMig /SetGlobalState 3command. -
ELIMINATING(transitional state 7) eliminates dependency of the Active Directory Domain Services service on the File Replication Service, stops it temporarily and removes all Active Directory-resident settings pertinent to itsSYSVOLreplication characteristics. These changes are relayed to other domain controllers via standard AD replication. It also deletes content of theSYSVOLfolder. Once these changes are completed, the FRS service is restarted again to accommodate scenarios where other content is replicated using this mechanism. -
ELIMINATED(stable state 3) constitutes the final state of migration. As before, its status can be verified by running theDFSRMig /GetMigrationStatecommand or checking the value ofLocal Stateregistry entry on individual domain controllers (as well as the presence of the event 8019 in the DFS Replication event log). In addition, theSysVolregistry entry (underHKLMSystemCurrentControlSetServicesNetlogonParameterskey) should point out theSYSVOL_DFSRfolder (and the value ofSysvolReadyentry in the same location should be set to1). -
UNDO REDIRECTING(transitional state 8) facilitates reverting from theREDIRECTEDtoPREPAREDstate. To invoke it, executeDFSRMig /SetGlobalState 1. As part of the transition, theSYSVOL_DFSRfolder is first synchronized with itsSYSVOLcounterpart (leveragingrobocopyutility) to account for any changes to its content that might have taken place while inREDIRECTEDstate (typically introduced via Group Policy modifications). This synchronization takes place on the PDC Emulator and is subsequently replicated via FRS-driven replication. -
UNDO PREPARING(transitional state 9) permits you to return to theSTARTstate fromPREPAREDstate (with FRS mechanism handlingSYSVOLreplication and theSYSVOL_DFSRfolder removed). To invoke it, useDFSRMig /SetGlobalState 0command. Note that, similarly to thePREPARINGtransitional state, PDC Emulator will be responsible for deleting all DFS-R Active Directory objects specific to Read Only Domain Controllers.
This concludes our overview of characteristics of DFS-R SYSVOL replication available in Windows Server 2008 functional level domains and an outline of the steps involved in transitioning to it from FRS mechanism employed in earlier implementations of Active Directory. Our next article will focus on new Group Policy features.