Navigation Bar

Windows File Systems - DFS


DFS overview
File Shares
The DFS root and DFS volumes
DFS Applications

Distributed File Sharing(DFS) Overview

DFS was introduced in Windows NT, and then developed further in Windows 2000 and 2003. The idea behind DFS is to hide the location of a file or directory from a user, so that if a file or disk moves around the user is unaware of the details. There is no requirement to change drive mappings or add extra drive letters. This also means that if data is moved onto new servers, or consolidated, this can also be transparent to users. The user does not need to know or care about the physical location of the file, only where it is located in the hierarchical view. That means that users no longer search for files by opening file servers and disk drives, and looking through a separate directory structure on each. Instead, users look through a logical directory that places shared information in a place that makes more sense to users and administrators alike. With DFS, an administrator does up-front work to logically organize information, so users don't have trouble finding it later on.

DFS makes it possible to group data together logically instead of having it grouped by physical server location. An example of this might be TSM error logs, which are physically located on every server backed up by TSM. With DFS, you define the TSM directory on each server as a DFS node, then group them all together under a TSM directory.

DFS locations are defined on a DFS server. If you have several of these on your network then Windows will automatically direct clients to use the closest DFS server. If that server fails, then you will be automatically switched to another DFS server. DFS can also refer to alternate data volumes, which can be used to balance performance by spreading the workload, or to provide resilience if a data disk becomes unavailable. Some failover functionality is provided for applications that are already accessing disk sessions, but these depend on how quickly an application can detect that a disk has failed. This can be almost instantaneous on hardware failure, or can take two or three minutes. Once the failure is detected, the application will switch to another disk. If you use replication on DFS shares, then avoid unnecessary replication to prevent saturating the network. Don't replicate the DFS root and try to schedule replication to run out of service hours.
Storage administrators were limited to creating a single DFS root per server with Windows 2000 DFS. Windows Server 2003 gives you the option to define multiple DFS roots.
DFS runs as a Windows service, and the service is defined to start automatically as part of the DFS installation. You can stop and start it manually using the 'Services' window

back to top


Shares

Windows allows you to mark directories or files as 'shares', which means that other users on a Network can access them. To enable shares for a directory, right click it with your mouse, then select the sharing option. This is 'sharing and security' on Windows XP. Click the 'Share this Folder' radio button, give the share a name, and by default the 'Everyone' user group will get read access. You can change the access levels with the 'Permissions' button.
Drives will have a default share which ends in a dollar sign, for example c$, this is the administrative share, and is not visible to others. To make a drive visible to others, you need to add a new share with the 'new share' radio button. Do not delete the administrative share.

Administrators can link shares together to create a single volume that looks like one massive hard drive to the users. Individual users can define their own DFS volumes, and these can be combined with other DFS volumes using inter-DFS links. Suppose you define the c: drive on your PC as a DFS volume. If you then turn your PC off, the volume is unavailable, but that does not affect any of the other DFS volumes in the DFS volume name space.
DFS will support either FAT or NTFS format DFS roots. If you cross a 'junction' to a DFS root with a different format, you change from one file format to the other.

back to top


The DFS root and DFS volumes

The starting point for DFS is the DFS root, which is a local share that hosts other shares. You define and administer the DFS root from 'Start', 'Programs', 'Administrative Tools', 'Distributed File System'.

There are two types of DFS root, stand-alone or domain-based.

  • A stand-alone DFS root can have only a single level of DFS links and cannot have root-level DFS shared folders.
  • A domain-based DFS root can have multiple levels of DFS links, can have root-level DFS shared folders and must be hosted on a domain member server.

A DFS volume is the combination of a DFS root, and the DFS links attached to it. A DFS volume is accessed using a standard UNC name:

  \\Server_Name\Dfs_Share_Name\Path\File 

where Server_Name is the name of the host computer, Dfs_Share_Name is your DFS root, and Path\File is any valid Win32 path name.

A volume can contain thousands of shares. If you access a remote share, then the system caches certain information locally. The next time you accesses that share, you access the local cache, rather than pulling a fresh copy from the remote server.

You can sometimes get a problem with DFS, where you know that DFS links are defined, but you can't see them if you browse the DFS root folder. Assuming that you have checked the obvious, and this is not due to a DFS filter, then there is a known error under Win2000 where the local file system place holders may be missing because the 8.3 file name support has been disabled.

To fix this, you need to update a registry key. You use the registry editor at your own risk and if you really get it wrong, you may need to reload the windows operating system.

If you know what you are doing, then the key you need to update is

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem

Look for the NtfsDisable8dot3NameCreation value, change the DWORD to type 0 then reboot the server.

back to top


DFS Applications

DFS can simplify server replacement. Every node in the DFS directory is assigned a logical name that points to a file share. The DFS node can be switched to point to a new server and the users do not know that they are accessing a different server. The logical names can be descriptive.

DFS can also simplify backup, especially if you need to backup workstations. The workstations can all be defined as DFS nodes, and then processed from a single root. The only issue is that your backup utility will not be able to re-create the DFS if a recovery is needed. You need to rebuild the DFS tree first before recovering the workstations. You could also apply the same principle to group all your servers together into a single volume, but the backup time will probably be excessive. If you chose to do this, you need to make sure that your recovery plan takes DFS into account.

You can run virus scanning and content indexing over several volumes from a single DFS root too.

Managing DFS

There are at least two ways to manage your DFS environment, you can access it from the Control panel, selecting Network, Services, then double click on 'Distributed File System', or you can use the Dfsadmin tool, which you access by either clicking on Programs from the START menu, then Administrative Tools, then Dfs Administrator, or by using the dfsadmin command from START, RUN.

The DFS commands that you can use include

  • Show Status - check if the DFS root is working ok
  • New Link, to associate a new share point with the DFS root
  • New Root Target, to redirect user accesses to the DFS root to a different location. You might want to do this to take the primary server down for maintenance.
  • Filter Links , you use this to make some DFS links invisible to some users
  • Hide Root, you use this to hide the root view from users. They can still access all the DFS shares, but they will not see the root unless they specify the exact share name.
  • Delete Root, you use this to disable access to the DFS system. This command will not delete the root folder, and will not delete any data, but will prevent access.

The DFSCMD command is useful for those of us who like command lines. To see the exact syntax of each command, type 'dfscmd /?' on the command line.

  • The dfscmd /map command is used to add a volume or folder to the DFS tree. The volumes or folders must be defined as shared already
  • The dfscmd /unmap command is used to remove a volume or folder from the DFS tree.
  • The dfscmd /add command is used to add alternate paths to a volume. You do this when a volume uses more than one shared folders for its storage, then user requests to access the volume are distributed among the alternate paths.
  • The dfscmd /remove is the converse command; you use this to remove alternate paths from a volume
  • The dfscmd /view command is used to change the way the list of DFS volumes looks in the DFSASMIN window. You can filter the list by name or number of alternate servers, and you can display the comments for each volume, and the full network path to each volume. You can also use the view parameter to backup the DFS structure as shown below.

DFS Backup and Restore

There appears to be two ways to do this too. The first method is suitable for a manual backup.

From DFS ADMINISTRATOR in the Control Panel, click on Save As on the DFS menu, type a file name in the 'file name' box, then click SAVE. You should use a meaningful file name like backup0506 to make it easy to identify later. This will save the DFS tree structure (but not the data) into a CSV file.

To restore the DFS tree, click LOAD from the DFS menu and you will see a list of backups. Select the backup file you want then click on OPEN. The second method is suitable for running as a scheduled script.
Use the command

DFSCMD /VIEW \\dfsname\dfsshare /BATCH << "path\file name.bat" 

This will create a batch file with all the information needed to rebuild the DFS tree (but not populate it with data) To Restore the DFS Structure you first need to create an empty DFS root, then you run the batch file created by the backup and that rebuilds the DFS tree.

back to top


By entering and using this site, you accept the conditions and limitations of use

 

 

 

Advertising banner for Lasconet