![](/uploads/1/2/6/2/126274038/842285444.png)
![Install dfsutil windows 7 download Install dfsutil windows 7 download](/uploads/1/2/6/2/126274038/941670318.gif)
In this howto, we are going to configure DFS role on a domain joined computer(s) to create distributed file shares to access from domain joined clients to use as a fileserver.1.What is Distributed File System ( DFS )?Distributed file System (DFS) is a set of client and server services that allow an organization using Microsoft Windows servers to organize many distributed SMB / file shares into a distributed file system. DFS provides location transparency (via the namespace component) and redundancy (via the file replication component) to improve data availability in the face of failure or heavy load by allowing shares in multiple different locations to be logically grouped under one folder, or DFS root. In left side pane you can find Namespace.
Thank you for your comment.I may have misunderstood you. From your first comment that had 'just evaluates' phrase it looked like Invoke-Expression does just that - only evaluates expression and does not executes the script. DFSDiag is available in Windows Vista, Server 2008, 7, and 2008 R2. For any 2008 or 2008 R2 systems not hosting the DFS Namespaces service, you will need to install the Distributed File System Tools found in the Remote Server Administration Tools (RSAT) by using Server Manager. RSAT is a separate download for Vista and Windows 7.
Right click on it and click New Namespace. In Namespace Wizard, you must specify the namespace server and click next. Now you have to enter a name for the namespace. This name will appear after the server or domain name in the namespace path, such as ServerName or DomainName.After giving name click edit settings and set permission as “Administrators have full access other users have read and write permissions”, then click ok and give next. By default, “All users have read only permissions” is set, and you can set any permissions as you require. Next part, selecting the type of Namespace you can use. There are two types of Name space, Domain based namespace and Standalone namespace.The basic difference between the two DFS namespaces is how they store the DFS configuration data.
Standalone namespaces keep this information in the host server's registry, while domain-based namespaces store it in the Active Directory (AD) database. Since we are using Domain joined computers, and we using DFS service for domain clients, we are using Domain based namespace.Domain-based namespace:A domain-based namespace is stored on one or more namespace servers and in Active Directory Domain Services. You can increase the availability of a domain-based namespace by using multiple servers.Stand-alone namespace:A stand-alone namespace is stored on a single namespace server. You can increase the availability of a stand-alone namespace by hosting it on a failover cluster.There will be a option Enable Windows Server 2008 mode, When created in Windows Server 2008 mode, the namespace supports increased scalability and access-based enumeration.
We use DFS at work and I noticed one of our laptops was always connecting to a target in a far away site. My own desktop was connecting to the wrong target but after a reboot it connected to the correct one.
There weren’t any user complaints about slowness, so could be that other machines were ok and/ or they weren’t noticing the slowness.DFS seemed to be set up correctly, and the laptop was picking up an IP in the correct site etc so it wasn’t any obvious misconfiguration.To investigate further I used the dfsutil tool. I got the idea for this from an. The dfsutil tool is a part of the DFS Management tools and is present in%WINDIR%System32.
It can be used to and is more powerful than the GUI. Since the laptop didn’t have this tool I copied it from my desktop (which had the DFS Management tools installed) to the laptop.First I checked if the laptop is able to reach the correct DC or DFSN server. I do this by examining the domain cache on the client. -WIN -DC03.rakhesh.local In the past the command used to be dfsutil /SpcInfo but now it’s the more intuitive dfsutil cache domain. The older switch still works though. (The domain cache is also called SPC cache, hence the switch is SpcInfo).In the output the entries with a.
are those which were obtained through the Workstation service. Like the domain name, the NETBIOS domain name, and the DC which the laptop is connected to.All other entries (both – and +) are obtained through referrals by the DFSN client.
Of these, entries with a + are currently used by the client. So in the case above, the laptop had got a referral to the rakhesh.local domain and was correctly latching on to the WIN-DC01 server which is the DC and DFSN server for its site.Next I examined the referral cache of the client to see if there are any errors that point out to why it is not using the correct referral link.DFSN stores information on the root name, the root servers, links, and target servers in a Partition Knowledge Table (PKT). This is stored in AD (in case of a domain based DFS) or the Registry (in case of a standalone DFS). Clients refer to this and cache it with then (so they don’t have to look it up always) and this is what we need to examine. Previously the command for this used to be dfsutil /PktInfo but now it’s replaced by the more intuitive dfsutil cache referral (notice how everything comes under the dfsutil cache sub-command).
C:dfsutil cache referral2 entries.Entry: WIN-DC01pubdownloadsShortEntry: WIN-DC01pubdownloadsExpires in 0 secondsUseCount: 1 Type:0x8001 ( DFS FAILBACKENABLED )0:win-data02downloads AccessStatus: 0 ( ACTIVE TARGETSET )1:win-data01downloads AccessStatus: 0xc000003a ( TARGETSET )Entry: rakhesh.localSysVolShortEntry: rakhesh.localSysVolExpires in 0 secondsUseCount: 0 Type:0x1 ( DFS )0:WIN-DC01.rakhesh.localSysVol AccessStatus: 0 ( ACTIVE )DfsUtil command completed successfully. DfsUtil command completed successfully.And therein lies the problem!
The laptop is correctly connecting to the WIN-DC01 DFSN server, this server is correctly returning the namespace (“pub”) and link (“downloads”) and referrals to the two targets for this link (on win-data01 and win-data02). But whereas we want the laptop to use win-data01, that is not set to active and has an error status returned.
Instead win-data02 is set as the active target.There doesn’t seem to be a definite cause behind the “0xc000003a” error code. What helped me finally was. I didn’t try the solution that helped the OP (though our office environment has a similar setup) as one of the suggested solutions did the trick for me.It appears that if the link targets have different offline caching settings, it considers the targets with offline caching enabled first and only if that fails does it consider the preferred target. So I checked my targets to see if they have different caching settings and sure enough the preferred target didn’t have caching. Turned on caching for it, rebooted the laptop, and now it picks up the correct target!An easy way to check whether all your targets have similar ACLs and offline caching settings is to us the dfsdiag command on the DC/ DFSN server. I ran the command thus.
![](/uploads/1/2/6/2/126274038/842285444.png)