DFS文件夾無法訪問

最近DFS的文件服務器出現了部分文件和文件夾無法訪問的情況。客戶端直接訪問DFS成員的共享文件夾時有是會出現Element not found的錯誤。有時打開文件的時候會出現文件不存在,或者你沒有權限的錯誤。這些問題隨機發生。沒有什麼規律可循。

初步定位到是由於DFS的name space無法將客戶端的請求引入到正確的文件服務器上,但是2臺文件服務器早已完成數據同步,數據是相同的。客戶端也沒有采用DFS的入口訪問。

採用命令檢查DFS的完整性,無法通過。出現錯誤

dfsdiag /testdfsintegrity /dfsroot:\\domain.com\dfsroot\share /recurse /full

Validating access, access control list (ACL), target state of DFS folders in namespace:
Error: The system cannot find the file specified.
Information: The registry key for the stand-alone namespace was not found. Attempting domain-based namespace tests.
Error: The specified domain either does not exist or could not be contacted.
Warning: Unable to access the DFS metadata for the following namespace:
Warning: The following DFS path is inaccessible and will not be tested again.

根據這兩個錯誤在網上搜不到什麼有用信息,很多都說是AD複製問題或者網絡問題的。用dfsutil root export導出meta data看也沒有什麼問題。根據這篇KB,檢查了AD數據庫和DFS各服務器的本地註冊表都是正常的,沒有什麼實用的解決步驟。

https://support.microsoft.com/en-us/help/977511/

最終,刪除整個DFS根和複製關係,重建DFS根添加文件夾複製。DFS一致性檢測這下就正常了。用戶訪問也沒有問題了。