DFS Link nesting

dfswindows-server-2008-r2

We currently have our DFS set up as follows:

\\domain\dfs\private
\\domain\dfs\shared
\\domain\dfs\home

We would like to move a subfolder of one target so that it appears to be the same but the target is moved to another server e.g.:
\\domain\dfs\private\subfolder to move from \\server\private\subfolder to \\newserver\share

With a test folder I have tried the following command:
dfsutil link add \\domain\dfs\private\subfolder \\newserver\share

Unfortunately, this throws an error.

Best Answer

When you're creating a folder in DFS, you have to choose from one of these two. Either the folder has a folder target pointing to a share, or it has subfolders.

It's not possible to structure DFS in such a way that a folder with a folder target has subfolders.

One possible workaround would be to add DFS folders for all subfolders in the existing \domain\dfs\private folders, with folder targets inside the shares in question. I.e. something like this:

\\domain\dfs\private           -> (no folder target)
\\domain\dfs\private\aaa       -> \\oldserver\private\aaa
\\domain\dfs\private\aaa       -> \\oldserver\private\bbb
\\domain\dfs\private\ccc       -> \\oldserver\private\ccc
\\domain\dfs\private\subfolder -> \\newserver\subfolder

Of course this might not be possible or practical in your scenario.


Logically, this makes sense, because if it were possible to do this config:

\\domain\dfs\private           -> \\oldserver\private
\\domain\dfs\private\subfolder -> \\newserver\subfolder

Then if you're doing a lookup for \\domain\dfs\private\subfolder, how would DFS know if you want to get to \\oldserver\private\subfolder or to \\newserver\subfolder? To avoid this kind of ambiguity, this setup is not possible.


Microsoft says: "Folders can contain folder targets or other DFS folders, but not both, at the same level in the folder hierarchy."

Source: https://technet.microsoft.com/en-us/library/cc732105.aspx