Bit of a weird one today. We recently migrated some data to OneDrive and as a result the corresponding DFS Namespace Folder was no longer required, so I deleted it thinking that will prevent it being accessed. The folder was still shared, but at a different path than the namespace.
Lets call the share path \\FileServer\Teachers, and the namespace folder \\domain.fqdn\domain\home\Teachers. The location of the original share was E:\domain\home\Teachers.
So I delete the namespace folder, an easy enough task in the DFS management snap in, right click on the folder you want to remove and click delete.
A few weeks later the customer reports their file server is running out of storage, I run a TreeSize on the C:\ volume which is the one that is filling up, TreeSize reports 50gb out of 150gb used. Weird, where’s the usage coming from then?
I delve a little deeper and find out that the C:\DFSRoots folder is actually consuming a lot of storage, I Google, I cant find the right phrase to sum up what I’m seeing, or why this folder is growing in size.
It turns out that some machines had cached an old GPO that is no longer linked, telling them to redirect their AppData to \\domain.fqdn\domain\home\Teachers, there is an option in the Folder Redirection GPO to create the path if it doesn’t exist, we normally enable this so that individual username folders are created, however in this instance it created the full path \Teachers\%Username%, this is because the root namespace folder \\domain.fqdn\domain\home still existed and users had access to create folders at this level. As the namespace folders were deleted the new files were created directly in C:\DFSRoots\Home\Teachers.
To fix the issue, I modified the permissions on the C:\DFSRoots\Home\Teachers folder so that only Enterprise Admins and myself had any NTFS permissions, and robocopied the data to where it should have been. Now that the clients can’t access the location they will default to C:\Users\%USERNAME% for their folder redirection. This would have been avoided if NTFS permissions were correct in the first instance, not allowing users to save into the \home\ folder.
Hope that helps someone and if not, hope you can laugh at my misery!