selftest: temporary skip samba.blackbox.pdbtest.s4winbind
[Samba.git] / docs-xml / Samba3-HOWTO / TOSHARG-msdfs.xml
blob5924d2c8c87e7025b24fd7cb28ada3e1f867d49c
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@lists.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 <indexterm><primary>distributed file system</primary><see>DFS</see></indexterm>
27 <indexterm><primary>physical locations</primary></indexterm>
28 <indexterm><primary>higher availability</primary></indexterm>
29 <indexterm><primary>load balancing</primary></indexterm>
30 <indexterm><primary>logical directories</primary></indexterm>
31         The distributed file system (DFS) provides a means of separating the logical
32         view of files and directories that users see from the actual physical locations
33         of these resources on the network. It allows for higher availability, smoother
34         storage expansion, load balancing, and so on.
35         </para>
37         <para>
38 <indexterm><primary>DFS</primary></indexterm>
39 <indexterm><primary>DFS tree</primary></indexterm>
40 <indexterm><primary>DFS-aware</primary></indexterm>
41         For information about DFS, refer to the <ulink
42         url="http://www.microsoft.com/NTServer/nts/downloads/winfeatures/NTSDistrFile/AdminGuide.asp">Microsoft
43         documentation</ulink>.  This document explains how to host a DFS tree on a UNIX machine (for DFS-aware clients
44         to browse) using Samba.
45         </para>
47         <para>
48 <indexterm><primary>DFS server</primary></indexterm>
49 <indexterm><primary>share-level</primary></indexterm>
50 <indexterm><primary>DFS junction</primary></indexterm>
51 <indexterm><primary>DFS-aware</primary></indexterm>
52         A Samba server can be made a DFS server by setting the global Boolean <smbconfoption name="host msdfs"/>
53         parameter in the &smb.conf; file. You designate a share as a DFS root using the share-level Boolean
54         <smbconfoption name="msdfs root"/> parameter. A DFS root directory on Samba hosts DFS links in the form of
55         symbolic links that point to other servers. For example, a symbolic link
56         <filename>junction-&gt;msdfs:storage1\share1</filename> in the share directory acts as the DFS junction. When
57         DFS-aware clients attempt to access the junction link, they are redirected to the storage location (in this
58         case, <parameter>\\storage1\share1</parameter>).
59         </para>
61         <para>
62 <indexterm><primary>DFS-aware</primary></indexterm>
63 <indexterm><primary>DFS tree</primary></indexterm>
64 <indexterm><primary>DFS links</primary></indexterm>
65 <indexterm><primary>DFS</primary></indexterm>
66         DFS trees on Samba work with all DFS-aware clients ranging from Windows 95 to 200x.
67         <link linkend="dfscfg">The following sample configuration</link> shows how to setup a DFS tree on a Samba server.
68         In the <filename>/export/dfsroot</filename> directory, you set up your DFS links to 
69         other servers on the network.
70 <screen>
71 &rootprompt;<userinput>cd /export/dfsroot</userinput>
72 &rootprompt;<userinput>chown root /export/dfsroot</userinput>
73 &rootprompt;<userinput>chmod 755 /export/dfsroot</userinput>
74 &rootprompt;<userinput>ln -s msdfs:storageA\\shareA linka</userinput>
75 &rootprompt;<userinput>ln -s msdfs:serverB\\share,serverC\\share linkb</userinput>
76 </screen>
77 </para>
79 <example id="dfscfg">
80 <title>smb.conf with DFS Configured</title>
81 <smbconfblock>
82 <smbconfsection name="[global]"/>
83 <smbconfoption name="netbios name">&example.server.samba;</smbconfoption>
84 <smbconfoption name="host msdfs  ">yes</smbconfoption>
86 <smbconfsection name="[dfs]"/>
87 <smbconfoption name="path">/export/dfsroot</smbconfoption>
88 <smbconfoption name="msdfs root">yes</smbconfoption>
89 </smbconfblock>
90 </example>
92         <para>
93 <indexterm><primary>DFS root</primary></indexterm>
94 <indexterm><primary>msdfs links</primary></indexterm>
95 <indexterm><primary>symbolic links</primary></indexterm>
96         You should set up the permissions and ownership of the directory acting as the DFS root so that only
97         designated users can create, delete, or modify the msdfs links. Also note that symlink names should be all
98         lowercase. This limitation exists to have Samba avoid trying all the case combinations to get at the link
99         name. Finally, set up the symbolic links to point to the network shares you want and start Samba.
100         </para>
102         <para>
103 <indexterm><primary>DFS-aware clients</primary></indexterm>
104 <indexterm><primary>DFS tree</primary></indexterm>
105         Users on DFS-aware clients can now browse the DFS tree on the Samba server at
106         <constant>\\samba\dfs</constant>. Accessing links linka or linkb (which appear as directories to the client)
107         takes users directly to the appropriate shares on the network.
108         </para>
110 </sect1>
112 <sect1>
113 <title>Common Errors</title>
114         <itemizedlist>
115                 <listitem><para>Windows clients need to be rebooted 
116                 if a previously mounted non-DFS share is made a DFS 
117                 root, or vice versa. A better way is to introduce a 
118                 new share and make it the DFS root.</para>
119                 </listitem>
120                 
121                 <listitem><para>Currently, there's a restriction that msdfs 
122                 symlink names should all be lowercase.</para>
123                 </listitem>
124                 
125                 <listitem><para>For security purposes, the directory 
126                 acting as the root of the DFS tree should have ownership 
127                 and permissions set so only designated users can 
128                 modify the symbolic links in the directory.</para>
129                 </listitem>
130         </itemizedlist>
132         <sect2>
133                 <title>MSDFS UNIX Path Is Case-Critical</title>
135                 <para>
136                 A network administrator sent advice to the Samba mailing list
137                 after long sessions trying to determine why DFS was not working.
138                 His advice is worth noting.
139                 </para>
141                 <para><quote>
142                 I spent some time trying to figure out why my particular
143                 DFS root wasn't working. I noted in the documentation that
144                 the symlink should be in all lowercase. It should be
145                 amended that the entire path to the symlink should all be
146                 in lowercase as well.
147                 </quote></para>
149                 <para>
150                 <quote>For example, I had a share defined as such:</quote>
151                 <smbconfblock>
152                 <smbconfsection name="[pub]"/>
153                 <smbconfoption name="path">/export/home/Shares/public_share</smbconfoption>
154                 <smbconfoption name="msdfs root">yes</smbconfoption>
155                 </smbconfblock>
156                 <quote>and I could not make my Windows 9x/Me (with the dfs client installed) follow this symlink:</quote>
157                 <screen>
158                 damage1 -> msdfs:damage\test-share
159                 </screen>
160                 </para>
162                 <para>
163                 <quote>Running a debug level of 10 reveals:</quote>
164                 <programlisting>
165                 [2003/08/20 11:40:33, 5] msdfs/msdfs.c:is_msdfs_link(176)
166                   is_msdfs_link: /export/home/shares/public_share/* does not exist.
167                 </programlisting>
168                 <quote>Curious. So I changed the directory name from <constant>.../Shares/...</constant> to
169                 <constant>.../shares/...</constant> (along with my service definition) and it worked!</quote>
170                 </para>
172         </sect2>
174 </sect1>
176 </chapter>