Welcome to TechNet Blogs Sign in | Join | Help

Ask the Directory Services Team

Microsoft's official Enterprise Platform Support DS blog

News

  • Disclaimer: All postings are provided "AS IS" with no warranties, and confer no rights. This weblog does not represent the thoughts, intentions, plans or strategies of Microsoft. Because a weblog is intended to provide a semi-permanent point-in-time snapshot, you should not consider out of date posts to reflect current thoughts and opinions.

    Locations of visitors to this page
Manually Clearing the ConflictAndDeleted Folder in DFSR

Ned here again. Today I’m going to talk about a couple of scenarios we run into with the ConflictAndDeleted folder in DFSR. These are real quick and dirty, but they may save you a call to us someday.

Scenario 1: We need to empty out the ConflictAndDeleted folder in a controlled manner as part of regular administration (i.e. we just lowered quota and we want to reclaim that space).

Scenario 2: The ConflictAndDeleted folder quota is not being honored due to an error condition and the folder is filling the drive.

Let’s walk through these now.

Emptying the folder normally

It’s possible to clean up the ConflictAndDeleted folder through the DFSMGMT.MSC and SERVICES.EXE snap-ins, but it’s disruptive and kind of gross (you could lower the quota, wait for AD replication, wait for DFSR polling, and then restart the DFSR service). A much faster and slicker way is to call the WMI method CleanupConflictDirectory from the command-line or a script:

1.  Open a CMD prompt as an administrator on the DFSR server.
2.  Get the GUID of the Replicated Folder you want to clean:

WMIC.EXE /namespace:\\root\microsoftdfs path dfsrreplicatedfolderconfig get replicatedfolderguid,replicatedfoldername

(This is all one line, wrapped)

Example output:

image

3.  Then call the CleanupConflictDirectory method:

WMIC.EXE /namespace:\\root\microsoftdfs path dfsrreplicatedfolderinfo where "replicatedfolderguid='<RF GUID>’" call cleanupconflictdirectory

Example output with a sample GUID:

WMIC.EXE /namespace:\\root\microsoftdfs path dfsrreplicatedfolderinfo where "replicatedfolderguid='70bebd41-d5ae-4524-b7df-4eadb89e511e’" call cleanupconflictdirectory

image

4.  At this point the ConflictAndDeleted folder will be empty and the ConflictAndDeletedManifest.xml will be deleted.

Emptying the ConflictAndDeleted folder when in an error state

We’ve also seen a few cases where the ConflictAndDeleted quota was not being honored at all. In every single one of those cases, the customer had recently had hardware problems (specifically with their disk system) where files had become corrupt and the disk was unstable – even after repairing the disk (at least to the best of their knowledge), the ConflictAndDeleted folder quota was not being honored by DFSR.

Here’s where quota is set:

image

Usually when we see this problem, the ConflictAndDeletedManifest.XML file has grown to hundreds of MB in size. When you try to open the file in an XML parser or in Internet Explorer, you will receive an error like “The XML page cannot be displayed” or that there is an error at line X. This is because the file is invalid at some section (with a damaged element, scrambled data, etc).

To fix this issue:

  1. Follow steps 1-4 from above. This may clean the folder as well as update DFSR to say that cleaning has occurred. We always want to try doing things the 'right' way before we start hacking.
  2. Stop the DFSR service.
  3. Delete the contents of the ConflictAndDeleted folder manually (with explorer.exe or DEL).
  4. Delete the ConflictAndDeletedManifest.xml file.
  5. Start the DFSR service back up.

For a bit more info on conflict and deletion handling in DFSR, take a look at:

Staging folders and Conflict and Deleted folders (TechNet)
DfsrConflictInfo Class (MSDN)

Until next time...

- Ned "Unhealthy love for DFSR" Pyle

Posted: Monday, October 06, 2008 10:21 AM by NedPyle
Filed under:

Comments

Marcel Heek said:

Ned,

great. I actually was looking for this today, because we had an issue where the "normal" cleanup for some reason did not occur and 130 GB of data was roaming around the ConflictAndDeleted folder. The WMI call did the trick, thanks.

regards,

Marcel Heek

# October 6, 2008 10:59 AM

NedPyle said:

There will be a small service fee for my psychic powers. :)

- nedpyle

# October 6, 2008 11:04 AM

snilsson said:

Hi Ned!

Now that you´re into the cleaning business =), what about the Staging folder under DfsrPrivate folder.

Are there any special considerations to have in mind if you want to clean that folder if there is data that seems to be stuck in it.

Regards

Stefan Nilsson

# October 7, 2008 2:20 AM

NathanielChangco said:

Hi there,

Thank you very much for the info. our DFS conflict folder bloated to a massive 130GB, and it almost gave me a panic attack! :P

I initially tried the WMI script, weirdly enough, it did not work (gasp!)

I am now doing a manual delete (DEL command), cross fingers and toes that it works as planned and won't bring down our infra. :P

will update the blog again.

Cheers!

Nathaniel

# November 4, 2008 12:05 AM

NathanielChangco said:

Thanks Ned for your tip. it worked and our DFS is now back to a stable size.

Cheers

Nathaniel

# November 4, 2008 3:17 PM
Anonymous comments are disabled
Page view tracker