If you would like to read Mitch Tulloch's other DFS articles please go to:
DFS (Distributed File System) was first introduced in Windows 2000 as a way of managing shared disk resources across a network and making it easier for users to find and access these resources. Unfortunately DFS in Windows 2000 was somewhat limited in its capabilities, especially in regard to providing high availability in distributed multi-site environments but also in efficiently replicating shared resources over slow WAN links. These limitations made DFS in Windows 2000 something of a pain to work with, and Windows Server 2003 offered little in terms of improvements.
With the release of Windows Server 2003 R2 however, a fresh release based on Windows Server 2003 Service Pack 1, DFS has been significantly enhanced in several ways. In this article and several following on WindowsNetworking.com, I’ll describe these enhancements and show how to implement them in various enterprise scenarios.
What used to be DFS in Windows 2000 and Windows Server 2003 is now two separate components in Windows Server 2003 R2:
- DFS Namespaces - This component allows you to create a namespace, which is a virtual free of shared folders located on different servers.
- DFS Replication - This component allows you to replicate the contents of shared folders using a new replication engine that replaces the File Replication Service (FRS) used by DFS in Windows 2000. Note that FRS is still used for replicating SYSVOL on domain controllers however.
The simplest way of installing these new DFS components is to use the Manage Your Server Wizard to add or upgrade the File Server role. Doing this installs the new DFS Management console and provides you the option of installing DFS Replication also if desired (Figure 1):
Figure 1: Installing DFS using the Manage Your Server Wizard
If you only want to implement DFS Namespaces, you don’t need to install the additional DFS Replication component (I’ll cover DFS Replication in a future article on WindowsNetworking.com). In addition, if you want to take advantage of all the R2 enhancements to DFS Namespaces, you should ensure that:
- All servers that host namespaces are running Windows Server 2003 R2 (or at least SP1).
- All domain controllers are running SP1 or later.
- All servers from which you plan on performing DFS namespace management tasks are running SP1 or later.
- In addition, all desktop computers that will be accessing your namespaces should be running Windows XP SP2 or later.
Creating a Namespace
Let’s use the new DFS Management console to create a new namespace. Our new namespace will be domain-based, that is, rooted at the domain (standalone namespaces are also supported and will be discussed later). Here’s the scenario we’re going to use for our example:
- The Accounting department uses two file servers, BOX 162 and 163.
- BOX162 hosts the following shares: Payables and Receivables.
- BOX 163 hosts the following shares: Invoices, Inventory, and Reports.
The department wants to use DFS Namespaces to consolidate these resources into a single virtual folder tree that looks something like this:
Accounts Payable (maps to Payables share)
Accounts Receivable (maps to Receivables share)
Inventory (maps to Inventory share)
Invoices (maps to Invoices share)
Report Database (maps to Reports share)
For purposes of this example, we’ll create our namespace on BOX162 on which we’ve installed the DFS Management console using the procedure outlined in the previous section. Start by opening the DFS Management console on this server and select the Namespaces node in the console tree (Figure 2):
Figure 2: Namespaces node in DFS Management console
Note that there are no namespaces until we choose to create one. To create a namespace, click New Namespace in the Action pane or right-click the Namespaces node and select New Namespace. The New Namespace Wizard starts and asks you to specify the server that will host your new namespace. Since we’ve installed DFS Namespaces on BOX162 we’ll use this server to host our namespace (Figure 3):
Figure 3: BOX612 will host the new namespace
Click Next to proceed with the wizard. If the DFS service is not running on BOX612, you’ll now be prompted to start it. Next you’ll specify a name for your namespace, and considering the requirements of the Accounting department previously, we’ll name our new namespace “Accounting” (Figure 4):
Figure 4: The new namespace will have the name Accounting
Note that we didn’t previously create an Accounting share on this server, so the wizard will create this for us. Click Next and select domain-based namespace as the type of namespace we want to create (Figure 5):
Figure 5: Selecting domain-based namespace
A quick aside here concerning namespace types:
- Domain-based namespaces - These namespaces are stored on both your namespace servers and within Active Directory. Storing namespaces in Active Directory makes them easier to search for in a domain-based networking environment, but the size of domain-spaced namespaces is limited to around 5000 folders. Also, a domain-based namespace can be hosted on more than one namespace server to provide fault tolerance.
- Standalone namespaces - These namespaces are stored only on name servers and not within Active Directory. The advantage of this approach is that you can host ten times more folders (up to 50,000 folders) in your namespace, but to make your namespace fault-tolerant you have to use clustering since a standalone namespace can only be hosted on a single server.
Clicking Next and then Create will create a new namespace named Accounting in the R2.local domain of our sample forest. This namespace will be rooted in a shared folder named C:\DFSRoots\Accounting on BOX162, and this root folder will also be created by the wizard shared with Everyone being given Read permission. Figure 6 shows the new namespace, which as yet has no folders in it:
Figure 6: The new Accounting namespace in the R2.local domain
Adding Folders to the Namespace
Now let’s add our folders to the namespace. There are two kinds of folders we need to add:
- Folders with targets - These are virtual (DFS) folders that map to real (physical) shared folders. For example, the folder Accounts Payable folder needs to have the Payables share on BOX162 as its target, the Report Database folder needs to have the Reports share on BOX163 as its target, and so on.
- Folders - These are virtual folders that don’t map to any real shared folders on the network but are simply used to organize how shared resources are presented to users by the namespace. For example, the Ledger folder needs to be created to contain the Accounts Payable and Accounts Receivable folders, which are both folders with targets located on BOX612.
To create a new folder in our Accounts namespace, select the namespace in the console tree and click New Folder in the Action pane or right-click the namespace and select New Folder. This opens the New Folder properties sheet, which lets you specify a name for your new folder and optionally a target. For example, to create the Ledger folder which has no target, enter the information shown in Figure 7:
Figure 7: Creating a folder with no target
Then select the Ledger folder in the console tree, click New Folder again, and create the Accounts Payable folder as shown in Figure 8:
Figure 8: Creating a new folder with a target
Continue creating folders, with and without targets, until the desired namespace is complete (Figure 9):
Figure 9: Finished namespace for the Accounting department
Testing the Namespace
To try accessing resources in our new namespace, we’ll log on as ordinary user Bob Smith to a desktop computer running Windows XP. Then, once logged on, we’ll click Start, then Run, type \\R2.local\Accounting (which is the root of our namespace) and click OK. This opens a window that displays four folders (Billing, Catalog, Ledger and Report Database) as if they are shared folders on a single server (Figure 10). By clicking into each of these folders we can access further folders and the documents stored within their target folders.
Figure 10: Viewing the namespace and its contents
It’s easy to use the DFS Management console to create a new namespace that brings together shared folders from multiple file servers into a single virtual folder tree. In my next article we’ll look deeper into DFS Namespaces and see how to further configure a namespace and its folder in a multi-site environment.
If you would like to read Mitch Tulloch's other DFS articles please go to: