Microsoft

Working with Windows 2000's Distributed File System

In a previous Daily Drill Down, Jim Boyce introduced you to Windows 2000's Distributed File System. But how do you actually use the thing? Here, Jim shows you how to implement and administer Dfs.


In the Daily Drill Down “Understanding the Windows 2000 Distributed File System,” I introduced you to the Windows Distributed File System (Dfs) and showed you what it can do. In addition, I discussed using mounted volumes in Windows 2000. But now it’s time to implement and administer Dfs. In this Daily Drill Down, I’ll show you how.

Creating and removing Dfs roots
Dfs is installed by default on a Windows 2000 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.

To create a Dfs root, open the Dfs console, right-click Distributed File System, and choose New Dfs Root to start the New Dfs Root Wizard. In the wizard, provide the following information:
  • Dfs Root Type: Select the option Create A Domain Dfs 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 Dfs Root to create a standalone root on any server, whether it’s standalone, 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 Share: 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 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.
  • Comment: 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 earlier, 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. 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 Display An Existing Dfs Root. The Dfs console will prompt you to specify or browse to 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 Remove Display Of Dfs Root.

Figure A
Use the Dfs console to manage Dfs roots and replicas on multiple servers.


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 Dfs 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 2000 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 standalone 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, and 2000 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.
  • Send The User To This Shared Folder: 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.
  • Comment: 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 the link. 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 Replica. Specify the following information in the resulting dialog box:
  • When A User Opens: This read-only field displays the Dfs link under which the replica is being created.
  • Send The User To This Shared Folder: 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 standalone Dfs root, you’ll find that the two replication options are unavailable, indicating that you can’t configure replication for replicas on standalone Dfs roots. If you need to modify a replica’s properties, right-click the replica and choose Properties. Check the section “Configuring replication” below for more information.

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 standalone 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.

Conclusion
The Windows 2000 Dfs is a very powerful new feature. Fortunately, Microsoft made it fairly easy to work with once you understand the basic concepts. In this Daily Drill Down, I’ve shown you how to work with Dfs.
The authors and editors have taken care in preparation of the content contained herein but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for any damages. Always have a verified backup before making any changes.

Editor's Picks

Free Newsletters, In your Inbox