Data Centers

SolutionBase: Working with Windows Server 2003's Distributed File System

Windows Server 2003's Distributed File System can help spread the load on your network to ensure increased performance and data reliability. Here's how you can make it work.

Windows 2003's Distributed File System (DFS) is installed by default on a Windows 2003 Server computer, so you don't need to add it. You use the DFS console, found in the Administrative Tools folder, to manage DFS. With the console, you can manage a DFS root or root replica locally, or manage DFS roots or replicas of servers across the network.

Keep in mind that a server can host only one root or root replica, but you can use the console to create a root or root replica on a remote server as well as on the local server. You can also display roots from multiple servers in a single console, enabling the DFS console to function as a single point of management for all DFS roots in the network, subject to your access permissions.

Creating and removing DFS roots

To create a DFS root, open the DFS console by clicking Start | Administrative Tools | Distributed File System. Right-click Distributed File System and choose New Root to start the New Dfs Root Wizard. In the wizard, provide the following information:

  • DFS Root Type: Select the option Create A Domain Root to create a DFS root in the Active Directory (AD). The target server must be a domain member server or domain controller (DC). Choose Create A Standalone Root to create a stand-alone root on any server, whether it's a stand-alone, a member server, or a DC.
  • Domain Name: If you're creating a domain-based DFS root, specify the domain name in which the root will be stored.
  • Host Server Name: For either type of DFS root, specify the name of the server that will act as the host for the DFS root.
  • Root Name: Specify the shared folder on the host that will serve as the root folder for the DFS namespace. You can specify an existing share or create a new share on the fly. The share can point to an empty folder or to one that contains subfolders. If it's the latter, the subfolders appear as folders directly under the root when users browse the DFS namespace. Additional DFS links appear as other folders under the same root.
  • Comments: Enter a comment that identifies the DFS root or provides other information about it. This comment appears with the root's properties when you view them within the DFS console. It does not appear to clients that browse the DFS namespace.

As I mentioned, you can use the DFS console to manage roots on multiple servers. Each root appears as its own branch in the left pane, as shown in Figure A.

Figure A

Use the DFS console to manage DFS roots and replicas on multiple servers.

To manage a particular root, simply select it from the list. To add a view of a root on another server, right-click Distributed File System and choose Show Root. The DFS console will prompt you to specify the host. To remove a DFS root from the console without deleting the root itself, right-click the root you want to remove from the console and choose Hide Root.

In some situations, you'll need to remove a DFS root from its host. For example, you might want to remove the existing root and create a new one. To remove a root from its host server, right-click the server's branch in the DFS console and choose Delete Root. Deleting a DFS root does not delete the shares or their contents but simply removes the DFS root structure from the target host.

Overview of DFS replication issues

Replication enables DFS to provide a measure of redundancy to help ensure that clients can access shares in a DFS namespace even if a server or share becomes unavailable. You can configure DFS to replicate an entire DFS root or individual DFS links, although DFS doesn't configure replication by default. DFS uses the Windows 2003 File Replication Service (FRS) to accomplish replication.

You can configure DFS for automatic replication only for domain-based DFS roots—and then only for data stored on NTFS volumes. FRS replicates the data every 15 minutes by default. You configure replication for a root or link through the object's replication policy, which you define either when you create the object or at any time thereafter.

DFS will not accomplish automatic replication for stand-alone DFS roots and replicas or for data stored on FAT volumes. Instead, you must replicate the data manually by dragging and dropping, using a script, or using another file-copy method. While you could use the AT command to schedule the replication, this entire scenario is not the best solution, since manual replication could be haphazard at best unless you closely monitor and manage the replication process. For that reason, domain-based DFS is generally the best method for providing DFS access and consistency because of the reduced administration involved.

Creating DFS links (directory replicas)

After you create a DFS root, you'll want to add links to shared directories either on the host's own file system or on other computers across the network. Windows 9x, NT, 2000, XP, and 2003 workstations and servers can host these shared folders.

To create a DFS link, open the DFS console and then open the DFS root where you want the link created. Right-click the host server and choose New Dfs Link. In the Create A New Dfs Link dialog box, specify the following information:

  • Link Name: This is the name by which the shared folder appears in the DFS namespace. It does not have to match the folder's actual share name.
  • Path To Target: Browse to or enter the UNC path to the shared folder you want to associate with the link. You can specify a local share or a remote share elsewhere on the network.
  • Comments: Use this optional comment to include descriptive information about the link. The comment is not presented to clients but appears only in the link's properties within the DFS console.
  • Clients Cache This Referral For: Specify the cache period for the link. This value determines how long the client caches referred data before refreshing from the share.

Managing replica sets

After you create a directory link, you can create additional replicas under it. For example, you might want to create multiple replicas to provide failover capability in case one of the shared folders becomes unavailable (such as its server going offline). In this situation, you simply create an additional replica under the existing link. Multiple replicas under a single link are called a replica set. DFS automatically and randomly chooses a replica from the set when a client requests a connection.

To create a replica set, first create the link and associate the first share with the link. Then, right-click the existing link and choose New Target. Specify the following information in the resulting dialog box:

  • Selected Link: This read-only field displays the DFS link under which the replica is being created.
  • Path To Target: Browse to or specify the UNC path to the local or network share that will be the target for the replica.
  • Manual Replication: Select this option to prevent the replica from being replicated by FRS.
  • Automatic Replication: Select this option to have FRS replicate the folder.

When you create replicas in a stand-alone DFS root, you'll find that the two replication options are unavailable, indicating that you can't configure replication for replicas on stand-alone DFS roots. If you need to modify a replica's properties, right-click the replica and choose Properties. For more information, check the section "Configuring replication" below.

Creating root replicas

In addition to creating DFS roots with the DFS console, you can create DFS root replicas. Naturally, the DFS root that will be the basis for the replica must exist first. You can create the root replica on any member server or DC in the network from any server with a DFS console.

To create a root replica, open the DFS console and connect to the server containing the root to be used as the basis. Right-click the DFS root and choose New Root Replica. Specify the following information when prompted by the New Dfs Root Wizard:

  • Server Name: Specify the name of a server that does not already host a DFS root or root replica.
  • Share Name And Path: Specify the name of the existing share on the target host that will serve as the root folder for the root replica. Or create a new share through the wizard.

Now that you have the root replica created, you should configure its replication policy.

Configuring replication

So far, I've discussed the need for replication to ensure that root replicas and shares are synchronized. Although you have to provide a manual means of replication for stand-alone roots and their shares, domain-based roots and shares can be replicated quite easily through DFS and the FRS. For both replicas and shares, you specify a replication policy that defines how and when the root or share is replicated.

DFS doesn't give you the option of defining the replication policy when you create a root replica, but you can modify the policy afterwards. Likewise, you can modify the replication policy for a share replica set. To modify the replication policy of a root replica or share replica set, right-click the object in the DFS console and choose Replication Policy to display the Replication Policy dialog box.

The Replication Policy dialog box lists all of the replicas for the selected object, displaying the name, replication status, domain, and site. The first time you display the replication policy for an object, you have the option of specifying which replica serves as the initial master and which one serves as the base from which the others are replicated. Once replication has been initiated, you no longer have the option of specifying an initial master.

To configure replication, open the Replication Policy dialog box for the root or share replica set in question. Right-click the root replica or the DFS link and choose Replication Policy. Select each replica in turn, and either enable or disable it for replication using the Enable or Disable button. Decide which replica will be the master and click Set Master. Then, click OK.

Editor's Picks

Free Newsletters, In your Inbox