1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % global_entities SYSTEM '../entities/global.entities'>
12 <firstname>Shirish</firstname><surname>Kalele</surname>
14 <orgname>Samba Team & Veritas Software</orgname>
16 <email>samba@samba.org</email>
22 <pubdate>12 Jul 2000</pubdate>
25 <title>Hosting a Microsoft Distributed File System Tree</title>
28 <title>Features and Benefits</title>
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.
38 For information about DFS, refer to the
39 <ulink url="http://www.microsoft.com/NTServer/nts/downloads/winfeatures/NTSDistrFile/AdminGuide.asp">Microsoft documentation</ulink>.
40 This document explains how to host a DFS tree on a UNIX machine (for DFS-aware
41 clients to browse) using Samba.
45 A Samba server can be made a DFS server by setting the global
46 Boolean <smbconfoption><name>host msdfs</name></smbconfoption>
47 parameter in the &smb.conf; file. You designate a share as a DFS
48 root using the Share Level Boolean <smbconfoption><name>msdfs root</name></smbconfoption> parameter. A DFS root directory on Samba hosts DFS
49 links in the form of symbolic links that point to other servers. For example, a symbolic link
50 <filename>junction->msdfs:storage1\share1</filename> in the share directory acts
51 as the DFS junction. When DFS-aware clients attempt to access the junction link,
52 they are redirected to the storage location (in this case, <parameter>\\storage1\share1</parameter>).
56 DFS trees on Samba work with all DFS-aware clients ranging from Windows 95 to 200x.
57 <link linkend="dfscfg">Following sample configuration</link> shows how to setup a DFS tree on a Samba server.
58 In the <filename>/export/dfsroot</filename> directory, you set up your DFS links to
59 other servers on the network.
61 &rootprompt;<userinput>cd /export/dfsroot</userinput>
62 &rootprompt;<userinput>chown root /export/dfsroot</userinput>
63 &rootprompt;<userinput>chmod 755 /export/dfsroot</userinput>
64 &rootprompt;<userinput>ln -s msdfs:storageA\\shareA linka</userinput>
65 &rootprompt;<userinput>ln -s msdfs:serverB\\share,serverC\\share linkb</userinput>
70 <smbconfexample id="dfscfg">
71 <title>smb.conf with DFS configured</title>
72 <smbconfsection>[global]</smbconfsection>
73 <smbconfoption><name>netbios name</name><value>&example.server.samba;</value></smbconfoption>
74 <smbconfoption><name>host msdfs </name><value>yes</value></smbconfoption>
76 <smbconfsection>[dfs]</smbconfsection>
77 <smbconfoption><name>path</name><value>/export/dfsroot</value></smbconfoption>
78 <smbconfoption><name>msdfs root</name><value>yes</value></smbconfoption>
82 <para>You should set up the permissions and ownership of
83 the directory acting as the DFS root so that only designated
84 users can create, delete or modify the msdfs links. Also note
85 that symlink names should be all lowercase. This limitation exists
86 to have Samba avoid trying all the case combinations to get at
87 the link name. Finally, set up the symbolic links to point to the
88 network shares you want and start Samba.</para>
90 <para>Users on DFS-aware clients can now browse the DFS tree
91 on the Samba server at \\samba\dfs. Accessing
92 links linka or linkb (which appear as directories to the client)
93 takes users directly to the appropriate shares on the network.</para>
97 <title>Common Errors</title>
99 <listitem><para>Windows clients need to be rebooted
100 if a previously mounted non-DFS share is made a DFS
101 root or vice versa. A better way is to introduce a
102 new share and make it the DFS root.</para>
105 <listitem><para>Currently, there's a restriction that msdfs
106 symlink names should all be lowercase.</para>
109 <listitem><para>For security purposes, the directory
110 acting as the root of the DFS tree should have ownership
111 and permissions set so only designated users can
112 modify the symbolic links in the directory.</para>
117 <title>MSDFS UNIX Path Is Case-Critical</title>
120 A network administrator sent advice to the Samba mailing list
121 after a long sessions trying to determine why DFS was not working.
122 His advice is worth noting.
126 I spent some time trying to figure out why my particular
127 dfs root wasn't working. I noted in the documentation that
128 the symlink should be in all lowercase. It should be
129 amended that the entire path to the symlink should all be
130 in lowercase as well.
134 For example, I had a share defined as such:
138 path = /export/home/Shares/public_share
142 and I could not make my Windows 9x/Me (with the dfs client installed)
146 damage1 -> msdfs:damage\test-share
151 Running a debug level of 10 reveals:
154 [2003/08/20 11:40:33, 5] msdfs/msdfs.c:is_msdfs_link(176)
155 is_msdfs_link: /export/home/shares/public_share/* does not exist.
158 Curious. So I changed the directory name from .../Shares/... to
159 .../shares/... (along with my service definition) and it worked!