4 >Hosting a Microsoft Distributed File System tree on Samba
</TITLE
7 CONTENT=
"Modular DocBook HTML Stylesheet Version 1.57"></HEAD
23 >Hosting a Microsoft Distributed File System tree on Samba
</A
35 >The Distributed File System (or Dfs) provides a means of
36 separating the logical view of files and directories that users
37 see from the actual physical locations of these resources on the
38 network. It allows for higher availability, smoother storage expansion,
39 load balancing etc. For more information about Dfs, refer to
<A
40 HREF=
"http://www.microsoft.com/NTServer/nts/downloads/winfeatures/NTSDistrFile/AdminGuide.asp"
42 > Microsoft documentation
</A
45 >This document explains how to host a Dfs tree on a Unix
46 machine (for Dfs-aware clients to browse) using Samba.
</P
48 >To enable SMB-based DFS for Samba, configure it with the
54 > option. Once built, a
55 Samba server can be made a Dfs server by setting the global
57 HREF=
"smb.conf.5.html#HOSTMSDFS"
65 > parameter in the
<TT
69 > file. You designate a share as a Dfs root using the share
71 HREF=
"smb.conf.5.html#MSDFSROOT"
79 > parameter. A Dfs root directory on
80 Samba hosts Dfs links in the form of symbolic links that point
81 to other servers. For example, a symbolic link
84 >junction-
>msdfs:storage1\share1
</TT
86 the share directory acts as the Dfs junction. When Dfs-aware
87 clients attempt to access the junction link, they are redirected
88 to the storage location (in this case, \\storage1\share1).
</P
90 >Dfs trees on Samba work with all Dfs-aware clients ranging
91 from Windows
95 to
2000.
</P
93 >Here's an example of setting up a Dfs tree on a Samba
97 CLASS=
"PROGRAMLISTING"
104 path = /export/dfsroot
109 >In the /export/dfsroot directory we set up our dfs links to
110 other servers on the network.
</P
118 >cd /export/dfsroot
</B
128 >chown root /export/dfsroot
</B
138 >chmod
755 /export/dfsroot
</B
148 >ln -s msdfs:storageA\\shareA linka
</B
158 >ln -s msdfs:serverB\\share,serverC\\share linkb
</B
162 >You should set up the permissions and ownership of
163 the directory acting as the Dfs root such that only designated
164 users can create, delete or modify the msdfs links. Also note
165 that symlink names should be all lowercase. This limitation exists
166 to have Samba avoid trying all the case combinations to get at
167 the link name. Finally set up the symbolic links to point to the
168 network shares you want, and start Samba.
</P
170 >Users on Dfs-aware clients can now browse the Dfs tree
171 on the Samba server at \\samba\dfs. Accessing
172 links linka or linkb (which appear as directories to the client)
173 takes users directly to the appropriate shares on the network.
</P
187 >Windows clients need to be rebooted
188 if a previously mounted non-dfs share is made a dfs
189 root or vice versa. A better way is to introduce a
190 new share and make it the dfs root.
</P
194 >Currently there's a restriction that msdfs
195 symlink names should all be lowercase.
</P
199 >For security purposes, the directory
200 acting as the root of the Dfs tree should have ownership
201 and permissions set so that only designated users can
202 modify the symbolic links in the directory.
</P