DFS NameSpace Issues - Migrating From FSR To DFSR Following AD Upgrade

Posted by Stephan McTighe on 6 Oct 2020

I recently assisted a friend who had an issue with DFS Namespaces following an Active Directory Upgrade from 2008R2 to 2012R2.  They were faced with not being able to access the NameSpace following the demotion of the last 2008R2 controller and promotion of the final 2012R2 controller.

Upon opening the DFS NameSpace management console, the following error was displayed when selecting the required NameSpace - “The namespace cannot be queried. Element not found.”

After looking in the FRS (File Replication Service) and DFSR (Distributed File System Replication) event logs, I came to realise that the forest was using FRS for replication! This isn’t supported after 2008R2.  Ideally, you would have completed the migration from FRS to DFSR before upgrading the domain controllers.

Note: Always make sure you have a backup, snapshot or other reliable rollback method in place before doing anything in your live environment. This worked for me, it doesn’t guarantee it will work for you!

With FRS being the likely cause, I needed to confirm this.  I ran the following command to confirm the status -

1Dfsrmig /getglobalstate

It returned the following result confirming that FRS was still in fact being used.

1Current DFSR global state: '**Start**'
2Succeeded.

Before being able to look at the DFS NameSpace issue, this needed addressing.  Luckily you can still remediate this after upgrading the domain controllers. I would still advise confirming all the prerequisites are in place BEFORE upgrading!

Now onto the migration from FRS to DFSR.

Firstly, run the following command to move the state to the second of the four states.  The four states being; Start, Prepared, Redirected and Eliminated.

1Dfsrmig /setglobalstate 1

You will then want to run a directory sync to speed things up, especially if you have a large replication interval!

Run the following RepAdmin command to get things moving.

1Repadmin /syncall /AdeP

You can then monitor the progress by running -

1Dfsrmig /getmigrationstate

You will then see any remaining domain controllers that are yet to have synchronized the new state.  Eventually you will see that all domain controllers have migrated to the second state; Prepared.

Now time to move to the Redirected state.  Same process as the previous set but this time specifying ‘setglobalstate 2’

1Dfsrmig /setglobalstate 2
2Repadmin /syncall /AdeP
3Dfsrmig /getmigrationstate

Again run the RepAdmin to get replication moving and monitor using the ‘getmigrationstate’ command.  As in the previous step, you will eventually see that all domain controllers have migrated to the third state; Redirected.

Last one! Same as before, but this time you want to use ‘setglobalstate 3 -

1Dfsrmig /setglobalstate 3
2Repadmin /syncall /AdeP
3Dfsrmig /getmigrationstate

Once complete you will get confirmation that you have reached the final state; Eliminated.

You will now be able to run the ’net share’ command to see that the SYSVOL share has been moved to 'C:\Windows\SYSVOL\_DFSR\sysvol' and that the FRS Windows service is stopped and set to disabled.

Output of the ’net share’ command

File Replication Service (FRS) service.

This should now give you a correctly functioning directory again! You will want to now check the Directory Services, File Replication and DFSR Logs in Windows Event Viewer to ensure you have no further errors.

Now onto repairing the NameSpace.  I read a few different blogs and guides for this, some included deleting the NameSpace via ADSI Edit others didn’t.

I found I didn’t need to delete anything, bonus.

The get the NameSpace accessible again I found that right clicking the NameSpace and removing it, followed by recreating it using the  ‘New NameSpace Wizard’ did the trick. 

Upon recreating it, all of the folders reappeared and were accessible again with no additional configuration required. (these screenshots are of my lab, not the live environment as it was not appropriate)

Thanks for reading!