5 <firstname>Shirish</firstname><surname>Kalele</surname>
7 <orgname>Samba Team & Veritas Software</orgname>
9 <email>samba@samba.org</email>
14 <pubdate>12 Jul 2000</pubdate>
18 <title>Hosting a Microsoft Distributed File System tree on Samba</title>
22 <title>Instructions</title>
24 <para>The Distributed File System (or Dfs) provides a means of
25 separating the logical view of files and directories that users
26 see from the actual physical locations of these resources on the
27 network. It allows for higher availability, smoother storage expansion,
28 load balancing etc. For more information about Dfs, refer to <ulink
29 url="http://www.microsoft.com/NTServer/nts/downloads/winfeatures/NTSDistrFile/AdminGuide.asp">
30 Microsoft documentation</ulink>. </para>
32 <para>This document explains how to host a Dfs tree on a Unix
33 machine (for Dfs-aware clients to browse) using Samba.</para>
35 <para>To enable SMB-based DFS for Samba, configure it with the
36 <parameter>--with-msdfs</parameter> option. Once built, a
37 Samba server can be made a Dfs server by setting the global
38 boolean <ulink url="smb.conf.5.html#HOSTMSDFS"><parameter>
39 host msdfs</parameter></ulink> parameter in the <filename>smb.conf
40 </filename> file. You designate a share as a Dfs root using the share
41 level boolean <ulink url="smb.conf.5.html#MSDFSROOT"><parameter>
42 msdfs root</parameter></ulink> parameter. A Dfs root directory on
43 Samba hosts Dfs links in the form of symbolic links that point
44 to other servers. For example, a symbolic link
45 <filename>junction->msdfs:storage1\share1</filename> in
46 the share directory acts as the Dfs junction. When Dfs-aware
47 clients attempt to access the junction link, they are redirected
48 to the storage location (in this case, \\storage1\share1).</para>
50 <para>Dfs trees on Samba work with all Dfs-aware clients ranging
51 from Windows 95 to 2000.</para>
53 <para>Here's an example of setting up a Dfs tree on a Samba
56 <para><programlisting>
63 path = /export/dfsroot
65 </programlisting></para>
68 <para>In the /export/dfsroot directory we set up our dfs links to
69 other servers on the network.</para>
71 <para><prompt>root# </prompt><userinput>cd /export/dfsroot</userinput></para>
72 <para><prompt>root# </prompt><userinput>chown root /export/dfsroot</userinput></para>
73 <para><prompt>root# </prompt><userinput>chmod 755 /export/dfsroot</userinput></para>
74 <para><prompt>root# </prompt><userinput>ln -s msdfs:storageA\\shareA linka</userinput></para>
75 <para><prompt>root# </prompt><userinput>ln -s msdfs:serverB\\share,serverC\\share linkb</userinput></para>
78 <para>You should set up the permissions and ownership of
79 the directory acting as the Dfs root such that only designated
80 users can create, delete or modify the msdfs links. Also note
81 that symlink names should be all lowercase. This limitation exists
82 to have Samba avoid trying all the case combinations to get at
83 the link name. Finally set up the symbolic links to point to the
84 network shares you want, and start Samba.</para>
86 <para>Users on Dfs-aware clients can now browse the Dfs tree
87 on the Samba server at \\samba\dfs. Accessing
88 links linka or linkb (which appear as directories to the client)
89 takes users directly to the appropriate shares on the network.</para>
95 <listitem><para>Windows clients need to be rebooted
96 if a previously mounted non-dfs share is made a dfs
97 root or vice versa. A better way is to introduce a
98 new share and make it the dfs root.</para>
101 <listitem><para>Currently there's a restriction that msdfs
102 symlink names should all be lowercase.</para>
105 <listitem><para>For security purposes, the directory
106 acting as the root of the Dfs tree should have ownership
107 and permissions set so that only designated users can
108 modify the symbolic links in the directory.</para>