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">
7 <firstname>Shirish</firstname><surname>Kalele</surname>
9 <orgname>Samba Team & Veritas Software</orgname>
11 <email>samba@samba.org</email>
17 <pubdate>12 Jul 2000</pubdate>
20 <title>Hosting a Microsoft Distributed File System Tree</title>
23 <title>Features and Benefits</title>
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.
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.
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->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>).
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.
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>
65 <title>smb.conf with DFS configured</title>
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>
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>
92 <title>Common Errors</title>
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>
100 <listitem><para>Currently, there's a restriction that msdfs
101 symlink names should all be lowercase.</para>
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>
112 <title>MSDFS UNIX Path Is Case-Critical</title>
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.
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.
129 For example, I had a share defined as such:
133 path = /export/home/Shares/public_share
137 and I could not make my Windows 9x/Me (with the dfs client installed)
141 damage1 -> msdfs:damage\test-share
146 Running a debug level of 10 reveals:
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.
153 Curious. So I changed the directory name from .../Shares/... to
154 .../shares/... (along with my service definition) and it worked!