Distributed File System (Dfs) Functions

The Distributed File System (Dfs) functions provide the ability to logically group shares on multiple servers and to transparently link shares into a single hierarchical name space.

Dfs organizes shared resources on a network in a tree structure. Each Dfs tree must have one root volume, a directory hosted by a server running Windows NT Server 4.0 and later. The root volume can have one level of shares, called leaf volumes, beneath it. Each leaf volume in a Dfs tree can be physically located on a different server.

When you add a leaf volume, Dfs creates a blank directory in the root volume directory that is called a junction point to the leaf volume. A junction point is a directory on a Net (formerly LAN Manager) share that points to, or references, a different Net share. When you remove a share that is the last share associated with a junction point, Dfs also deletes the blank directory in the root volume directory.

A Dfs junction point that has one or more shares for its storage has alternate paths. When a junction point includes alternate paths, Dfs distributes requests for storage access among the alternate paths. However, the Dfs software does not replicate information among servers. For this reason it is advisable to use alternate paths for read-only shares. Dfs has a limit of 32 alternate paths for a junction point in a Dfs tree.

An application can use the Dfs functions to:

The Dfs functions are listed following.

Function Description
NetDfsAdd Adds a new junction point or adds a share to an existing junction point.
NetDfsEnum Enumerates and returns information about all junction points.
NetDfsGetInfo Returns information about a specific junction point.
NetDfsRemove Removes a share from a junction point; removes the junction point if the share is the last associated with the specified junction point.
NetDfsSetInfo Associates information with a junction point.

Dfs functions are available at five information levels:

DFS_INFO_1
DFS_INFO_2
DFS_INFO_3
DFS_INFO_100
DFS_STORAGE_INFO

Shares on computers that are running Windows NT Workstation, Windows 95, Windows 98, or Windows for Workgroups can be published in a Dfs name space. You can also publish any non-Microsoft shares for which client redirectors are available in a Dfs name space. However, unlike a share that is published on a server that is running Windows NT Server 4.0 and later, they cannot host a Dfs share or point to other Dfs shares.