0

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.

James Ruskin
  • 479
  • 5
  • 14
user3045672
  • 67
  • 1
  • 2
  • 5
  • What's the error when you try the test command? – James Ruskin Sep 29 '15 at 16:09
  • The given link already exists. To add Link Target use the command "dfsutil target add" Could not execute the command successfully SYSTEM ERROR - The file exists. – user3045672 Sep 30 '15 at 06:58
  • and I believe that the error occurs because the '\\domain\dfs\private' folder already exists? I have already created and shared the \\newserver\share folder – user3045672 Sep 30 '15 at 07:06

1 Answers1

0

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

Per von Zweigbergk
  • 2,625
  • 2
  • 19
  • 28
  • Ok that makes sense, so essentially I would need to remove the DFS folder \\domain\dfs\private (this being where everyone's priveate drive is mapped to as some have multiple depending on permissions. Then I would need to add all the subfolders which in essence would automatically create \\domain\dfs\private but only as a virtual folder? – user3045672 Sep 30 '15 at 07:34
  • Actually, you leave the folder where it is, but you remove the folder targets. That will allow you to create subfolders to the folder. You can then add folder targets to the subfolders. – Per von Zweigbergk Sep 30 '15 at 11:44
  • I have done this in a test folder, if I delete the targets it wants to delete the destination folder. If I delete the dfs folder it leaves the destination folders in place. Then I add the folder again with no targets and under the folder I add the individual targets. This seems to work best. The last thing I need to be wary of is dfs-r which is currently in place on the root folder (around 1.2TB). Do you think it would be best if I split this into a replication group for each subfolder? My thought is that it would be beneficial to split it as it would then be in more manageable chunks. – user3045672 Oct 01 '15 at 09:24
  • Ah ok, I see. It is talking about the DFS folder not the target folder! – user3045672 Oct 01 '15 at 13:14
  • Glad you figured it out! Regarding the replication group split-up question, that would be a different question and should be listed as such. – Per von Zweigbergk Oct 01 '15 at 13:16