Difference between revisions of "Distributed File System (DFS)"

From SambaWiki
Jump to: navigation, search
(Created page with "DFS (Distributed File System) is a feature that provides several functions: alternative name space, load balancing, and automatic failover. Technically DFS provides access to a …")
 
(Added info about FRS)
Line 1: Line 1:
 +
FRS (File Replication Service) is used to replicate SYSVOL
 +
in Windows Server 2000 and 2003. It is slowly being replaced
 +
by Microsoft with DFS-R (Distributed File System Replication)
 +
in newer versions of Windows Server.
 +
 +
''Samba does not yet include SYSVOL replication,
 +
neither with FRS, nor with DFS-R.''
 +
 +
DFS-R is often viewed as subfunction of DFS, and both are often
 +
used together, but they can also be used completely separately:
 +
DFS with multiple targets can be used without DFS-R (if the folder
 +
contents are updated with some other method), and DFS-R can
 +
replicate shared folders that are not DFS-targets.
 +
 +
Samba partially supports DFS, but not DFS-R yet.
 +
 +
 
DFS (Distributed File System) is a feature that provides several functions:
 
DFS (Distributed File System) is a feature that provides several functions:
 
alternative name space, load balancing, and automatic failover.
 
alternative name space, load balancing, and automatic failover.

Revision as of 12:48, 29 June 2014

FRS (File Replication Service) is used to replicate SYSVOL in Windows Server 2000 and 2003. It is slowly being replaced by Microsoft with DFS-R (Distributed File System Replication) in newer versions of Windows Server.

Samba does not yet include SYSVOL replication, neither with FRS, nor with DFS-R.

DFS-R is often viewed as subfunction of DFS, and both are often used together, but they can also be used completely separately: DFS with multiple targets can be used without DFS-R (if the folder contents are updated with some other method), and DFS-R can replicate shared folders that are not DFS-targets.

Samba partially supports DFS, but not DFS-R yet.


DFS (Distributed File System) is a feature that provides several functions: alternative name space, load balancing, and automatic failover.

Technically DFS provides access to a shared directory that contains no files, only junctions, and optionally subdirectories with more junctions. Junctions are similar to soft links as known from Unix file systems, but ones that point to shared directories, and they can also point to shared directories on other servers. The clients first ask the DFS server for the junction, then access the file server where this junction points to.

The main use of this is to create an alternative name space (directory tree view), that hides details of the underlying infrastructure from the users. The paths that the users see (called DFS names) do not change when servers are renamed, or when some of the directories are moved to a different server. The administrators can simply replace the outdated DFS name with a new one, that points to the new target.

A DFS name can optionally point to more than one target (i.e. tell the client several alternative junctions to different shared folders). In this case clients can access either of the targets. This provides load balancing, and automatic failover to another server, if one server fails.

Samba 4 does not yet provide all of these functions.


DFS can be either stand-alone, or domain-based.

The stand-alone variant runs on one single server and causes the DFS names to contain the name of that server, they look like shares that are provided by that server.

The domain based setup causes the DFS names to contain only the name of the domain, not the name of any specific server. Several servers in the domain can act as DFS servers in parallel. Clients automatically select one of the DFS servers and send their queries to that one.


The method to set up the stand-alone variant with Samba is described here:
https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/msdfs.html

In short it requires in the config file smb.conf the global option

 host msdfs = yes

and in one share declaration the two options

 path = /export/dfsroot
 msdfs root = yes

Then in the specified path create entries by running commands like

 ln -s msdfs:storage0\\share0 linka
 ln -s msdfs:server1\\share,server2\\share linkb

The first example defines one target, the second example creates two alternative targets that share the same contents.

Windows clients will see these as junctions.

There is currently an important limitation in the Samba implementation: Neither the path dfsroot specified in the DFS share, nor any of the share paths in the ln-commands must contain upper case characters. The links might be allowed to contain upper case characters.


There is currently (June 2014) an ongoing discussion in the mailing list whether or not domain based DFS, load balancing, and failover are currently supported by Samba 4.

DFS-R (replication) is definitely not yet implemented.