Another set of updates; includes the new examples code and use of
[Samba.git] / docs / Samba3-HOWTO / TOSHARG-msdfs.xml
blobf5d066e68153ade6fed26bd4a847145e9c9f4530
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE chapter PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <chapter id="msdfs">
5 <chapterinfo>
6         <author>
7                 <firstname>Shirish</firstname><surname>Kalele</surname>
8                 <affiliation>
9                         <orgname>Samba Team &amp; Veritas Software</orgname>
10                         <address>
11                                 <email>samba@samba.org</email>
12                         </address>
13                 </affiliation>
14         </author>
15         &author.jht;
16         
17         <pubdate>12 Jul 2000</pubdate>
18 </chapterinfo>
20 <title>Hosting a Microsoft Distributed File System Tree</title>
22 <sect1>
23 <title>Features and Benefits</title>
25         <para>
26         The Distributed File System (DFS) provides a means of separating the logical
27         view of files and directories that users see from the actual physical locations
28         of these resources on the network. It allows for higher availability, smoother
29         storage expansion, load balancing, and so on.
30         </para>
32         <para>
33         For information about DFS, refer to the 
34 <ulink url="http://www.microsoft.com/NTServer/nts/downloads/winfeatures/NTSDistrFile/AdminGuide.asp">Microsoft documentation</ulink>.
35         This document explains how to host a DFS tree on a UNIX machine (for DFS-aware
36         clients to browse) using Samba.
37         </para>
39         <para>
40         A Samba server can be made a DFS server by setting the global 
41         Boolean <smbconfoption name="host msdfs"/>
42         parameter in the &smb.conf; file. You designate a share as a DFS
43         root using the Share Level Boolean <smbconfoption name="msdfs root"/> parameter. A DFS root directory on Samba hosts DFS
44         links in the form of symbolic links that point to other servers. For example, a symbolic link
45         <filename>junction-&gt;msdfs:storage1\share1</filename> in the share directory acts
46         as the DFS junction. When DFS-aware clients attempt to access the junction link,
47         they are redirected to the storage location (in this case, <parameter>\\storage1\share1</parameter>).
48         </para>
50         <para>
51         DFS trees on Samba work with all DFS-aware clients ranging from Windows 95 to 200x.
52         <link linkend="dfscfg">Following sample configuration</link> shows how to setup a DFS tree on a Samba server.
53         In the <filename>/export/dfsroot</filename> directory, you set up your DFS links to 
54         other servers on the network.
55 <screen>
56 &rootprompt;<userinput>cd /export/dfsroot</userinput>
57 &rootprompt;<userinput>chown root /export/dfsroot</userinput>
58 &rootprompt;<userinput>chmod 755 /export/dfsroot</userinput>
59 &rootprompt;<userinput>ln -s msdfs:storageA\\shareA linka</userinput>
60 &rootprompt;<userinput>ln -s msdfs:serverB\\share,serverC\\share linkb</userinput>
61 </screen>
62 </para>
64 <example id="dfscfg">
65 <title>smb.conf with DFS configured</title>
66 <smbconfblock>
67 <smbconfsection name="[global]"/>
68 <smbconfoption name="netbios name">&example.server.samba;</smbconfoption>
69 <smbconfoption name="host msdfs  ">yes</smbconfoption>
71 <smbconfsection name="[dfs]"/>
72 <smbconfoption name="path">/export/dfsroot</smbconfoption>
73 <smbconfoption name="msdfs root">yes</smbconfoption>
74 </smbconfblock>
75 </example>
77         <para>You should set up the permissions and ownership of 
78         the directory acting as the DFS root so that only designated 
79         users can create, delete or modify the msdfs links. Also note 
80         that symlink names should be all lowercase. This limitation exists 
81         to have Samba avoid trying all the case combinations to get at 
82         the link name. Finally, set up the symbolic links to point to the 
83         network shares you want and start Samba.</para>
85         <para>Users on DFS-aware clients can now browse the DFS tree 
86         on the Samba server at \\samba\dfs. Accessing 
87         links linka or linkb (which appear as directories to the client) 
88         takes users directly to the appropriate shares on the network.</para>
89 </sect1>
91 <sect1>
92 <title>Common Errors</title>
93         <itemizedlist>
94                 <listitem><para>Windows clients need to be rebooted 
95                 if a previously mounted non-DFS share is made a DFS 
96                 root or vice versa. A better way is to introduce a 
97                 new share and make it the DFS root.</para>
98                 </listitem>
99                 
100                 <listitem><para>Currently, there's a restriction that msdfs 
101                 symlink names should all be lowercase.</para>
102                 </listitem>
103                 
104                 <listitem><para>For security purposes, the directory 
105                 acting as the root of the DFS tree should have ownership 
106                 and permissions set so only designated users can 
107                 modify the symbolic links in the directory.</para>
108                 </listitem>
109         </itemizedlist>
111         <sect2>
112                 <title>MSDFS UNIX Path Is Case-Critical</title>
114                 <para>
115                 A network administrator sent advice to the Samba mailing list
116                 after a long sessions trying to determine why DFS was not working.
117                 His advice is worth noting.
118                 </para>
120                 <para><quote>
121                 I spent some time trying to figure out why my particular
122                 dfs root wasn't working. I noted in the documentation that
123                 the symlink should be in all lowercase. It should be
124                 amended that the entire path to the symlink should all be
125                 in lowercase as well.
126                 </quote></para>
128                 <para>
129                 For example, I had a share defined as such:
131                 <screen>
132                 [pub]
133                         path = /export/home/Shares/public_share
134                         msdfs root = yes
135                 </screen>
137                 and I could not make my Windows 9x/Me (with the dfs client installed)
138                 follow this symlink:
140                 <screen>
141                         damage1 -> msdfs:damage\test-share
142                 </screen>
143                 </para>
145                 <para>
146                 Running a debug level of 10 reveals:
148                 <programlisting>
149                 [2003/08/20 11:40:33, 5] msdfs/msdfs.c:is_msdfs_link(176)
150                   is_msdfs_link: /export/home/shares/public_share/* does not exist.
151                 </programlisting>
153                 Curious. So I changed the directory name from .../Shares/... to
154                 .../shares/... (along with my service definition) and it worked!
155                 </para>
157         </sect2>
159 </sect1>
161 </chapter>