Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 694
  • Last Modified:

DFS and conflict and deleted items

We had an issue with dfs database and it got dirty shutdown. As per microsoft kb article it should restart if we issue this command below
wmic /namespace:\\root\microsoftdfs path dfsrVolumeConfig where volumeGuid=""E18D8280-2379-11E2-A5A0-806E6F6E6963"" call ResumeReplication.
It gave me surprise by deleting all the files from the folder.
Files goes to deleted item/conflict folder if it is being accessed by more than one users in more than one server, this is not our case !!
Why it went into that folder?

Is it wrong to ins sue that command to restart the database?
  • 3
  • 2
1 Solution
By default if you have 2008 R2 DFS servers, the dirty shutdown recovery process should get started automatically without any command
However, in that case there are chances that data deletion may happens
Install below hotfix to save from data deletion on 2008 R2 DFS servers

Reference article

To have DFSR perform AutoRecovery when a dirty database shutdown is detected, edit the following registry value after hotfix 2780453 is installed in Windows Server 2008 R2.
If the value does not exist, you must create it.
Key: HKLM\System\CurrentControlSet\Services\DFSR\Parameters
Value: StopReplicationOnAutoRecovery
Type: Dword
Data: 0

With 2012 and above hotfix is already included in OS and you need to simply create above registry key

There is one more hotfix you can install on 2008 R2 DFS servers
After you install hotfix 2663685 autorecovery function is disabled and then you need manual WMI command to start recovery process.
Microsoft has introduced new functionality to the DFS Replication (DFSR) service for Windows Server 2008 R2 through hotfix 2663685
You can use StopReplicationOnAutoRecovery registry key to keep autorecovery function enabled or disabled by setting its value to either 0 OR 1
0 - means autorecovery is enabled
1 - means autorecovery is disabled
sara2000Author Commented:
thank you for your reply.
I am new to this dfs other than restarting the services and check whether replication take place.
I now have to get into this.
Can i restore the files from backup and start the dfs?

is there anyway i can get the files from deleted item folder? i am not sure whether this folder has all deleted items or not.
I hope dfs data is intact on primary member.
one option could be, you can delete replica from DFS and recreate brand new DFS replica.

Another option could be prestage dfs replica from backup
You need to use Windows server backup for that

you can simply restore Replica from backup if you already have backup
sara2000Author Commented:
Thank you for your info.
Is there anyway we can monitor if dfs database  shutdown, not the service?
If you are getting event ID 2213 in DFS events, it means your DFS database is in dirty shutdown state

Event ID 2213
The DFS Replication service stopped replication on volume C:. This occurs when a DFSR JET database is not shut down cleanly and Auto Recovery is disabled. To resolve this issue, back up the files in the affected replicated folders, and then use the ResumeReplication WMI method to resume replication.

I believe the question was raised to resolve issue pertaining to above event only

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now