a86cd74235c4dcd96998e4fb1c4eeb5d6f44c6b0
[abartlet/samba.git/.git] / docs / docbook / projdoc / msdfs_setup.xml
1 <chapter id="msdfs">
2
3 <chapterinfo>
4         <author>
5                 <firstname>Shirish</firstname><surname>Kalele</surname>
6                 <affiliation>
7                         <orgname>Samba Team &amp; Veritas Software</orgname>
8                         <address>
9                                 <email>samba@samba.org</email>
10                         </address>
11                 </affiliation>
12         </author>
13         
14         <pubdate>12 Jul 2000</pubdate>
15 </chapterinfo>
16
17
18 <title>Hosting a Microsoft Distributed File System tree on Samba</title>
19
20 <sect1>
21
22         <title>Instructions</title>
23
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>
31
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>
34
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-&gt;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>
49
50         <para>Dfs trees on Samba work with all Dfs-aware clients ranging 
51         from Windows 95 to 2000.</para>
52         
53         <para>Here's an example of setting up a Dfs tree on a Samba 
54         server.</para>
55
56         <para><programlisting>
57 # The smb.conf file:
58 [global]
59         netbios name = SAMBA
60         host msdfs   = yes
61
62 [dfs]
63         path = /export/dfsroot
64         msdfs root = yes
65         </programlisting></para>
66
67
68         <para>In the /export/dfsroot directory we set up our dfs links to 
69         other servers on the network.</para>
70
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>
76
77
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>
85
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>
90
91         <sect2>
92                 <title>Notes</title>
93
94                 <itemizedlist>
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>
99                         </listitem>
100                         
101                         <listitem><para>Currently there's a restriction that msdfs 
102                         symlink names should all be lowercase.</para>
103                         </listitem>
104                         
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>
109                         </listitem>
110                 </itemizedlist>
111         </sect2>
112 </sect1>
113
114
115         
116 </chapter>