What is the purpose of the 'Deleted' folder in DFSR?

What is the purpose of the 'Deleted' folder in DFSR?

  • Comments 7
  • Likes

Hi, Ned again – and surprisingly, talking about DFSR!

From time to time a customer will ask us about the Deleted folder in a Distributed File System Replication (DFSR) content set. It never seems to have anything in it. Not to mention we have a folder called ConflictAndDeleted and there definitely are deleted files in there.

image

So what gives?

The Deleted folder only comes into regular use when the option 'Move deleted files to Conflict and Deleted folder' is unchecked under Advanced for a given replicated folder membership in DFSMGMT.MSC, like below:

image

When this is unchecked, a deleted file is no longer copied into ConflictAndDeleted, nor is the ConflictAndDeletedmanifest.xml file updated. Instead, the file on a downstream partner is temporarily moved into the Deleted folder while the DFSR database and USN are updated, then deleted directly from that folder.

Unless that checkbox was turned off and a massive quantity of deletes was processed, it's unlikely you will ever see files in that folder for more than a moment. But we do have a way to see things happening on the file system faster than a speeding bullet – Process Monitor.

If we run Process monitor on a downstream server and configure our filter to ‘path -> begins with -> the replicated folder’ we can see what goes on under the hood with minimal chaff.

image

Then we can just delete a file on an upstream server. Here’s what happens when I delete ‘Readme.doc’ on the upstream server and the deletion request reaches my downstream partner:

image

That’s kinda chaffy to read, so let’s cut to the important parts:

1. The file e:\datarf\readme.doc is moved to e:\datarf\dfsrprivate\deleted\ReadMe.doc-{AC759213-00AF-4578-9C6E-EA0764FDC9AC}-v141560

Perfmon Log entry:

"2:57:15.5042328 PM","Dfsr.exe","2260","SetRenameInformationFile","E:\DataRF\ReadMe.doc", "SUCCESS","ReplaceIfExists: True, FileName: E:\DataRF\DfsrPrivate\Deleted\ReadMe.doc-{AC759213-00AF-4578-9C6E-EA0764FDC9AC}-v141560"

(Do you remember from previous blog posts what the long GUID refers to? It’s the server that originated the deletion. The file is being mangled here with GUID and version because this is what would have been written into ConflictAndDeleted to maintain uniqueness.)

2. Then the file is deleted

Perfmon Log entry:

"2:57:15.5056190 PM","Dfsr.exe","2260","SetDispositionInformationFile", "E:\DataRF\DfsrPrivate\Deleted\ReadMe.doc-{AC759213-00AF-4578-9C6E-EA0764FDC9AC}-v141560","SUCCESS","Delete: True"

In case you’re curious, the Deleted folder cannot be… deleted. If you do so, the DFSR service will simply add it back in the next it’s restarted.

So we covered a bit of DFSR and a bit of Process Monitor. I hope you found this interesting. Perhaps in the comments section someone wants to take a guess at what the Installing folder is for?

- Ned Pyle

  • Ned,

    My guess would be that when the file is replicated (either complete or by using RDC) the file is stripped with alternate filestreams (CRC info) and plced in the installing folder prior to moving it into the replicated folder, possible to give DFS-R and USN journal time to record the actions performed.

    Good job on giving us all this info on DFS-R, great tool.

    regards,

    Marcel Heek

  • The Old New Thing : The implementation of iterators in C# and its consequences (part 3) Notes from a

  • You were just about spot on there Marcel. :) As the file is decompressed from staging (which may take some time if quite large), there needs to be a place to do the work safely without interrupting use of the real file. Once the decompression is done and everything is unmarshaled, it can be moved from Installing to the final destination instantly.

  • So the install folder is the same as pre-install in FRS days?

  • Exactly like that, yes.

  • Hello, everyone Below you have a compilation of some very interesting blog posts from AskDS and Extreme

  • Check out the following posts: What is the purpose of the 'Deleted' folder in DFSR? DFSR and