Configuring and Troubleshooting MS DFS links in an HP CIFS Server (Samba) Environment Executive summary............................................................................................................................... 2 What IS MS DFS? ............................................................................................................................ 2 Configuring MS DFS on HP CIFS Server .................................................................................................
Executive summary HP CIFS Server (Samba) has the ability to host Microsoft Distributed File System (MS DFS). With careful planning, this can enable you to create a virtual smb file and directory tree spanning multiple servers and file systems. This whitepaper presents a sample configuration of MS DFS on an HP CIFS Server and discusses several potential pitfalls encountered in a MS DFS environment.
Figure 1 gives us a picture of our test environment. Figure 1: MS DFS Test Environment Server:rkm-nt Server:ceres Shared_stuff Dfsroot linka linkb Server:mccall Shared_stuff Client:mccallevo Configuration details There are three steps to configuring MS DFS on an HP CIFS Server. Two modifications to the /etc/opt/samba/smb.conf file and the actual creation of the MS DFS links in the HP-UX file system directory that is hosting the MS DFS root.
password server = ceres log level = 10 syslog = 0 log file = /var/opt/samba/log.%m max log size = 1000 host msdfs = Yes read only = No [dfsroot] path = /dfsroot msdfs root = Yes Note the two red colored parameters above in [global] and [dfsroot], respectively: ‘Host msdfs = yes’: This parameter must be set to yes to enable samba to host MS DFS links in individual shares. ‘msdfs root = yes’: This parameter is set to yes in any share that will contain MS DFS links to other servers.
NOTE: Currently the symbolic names used in MS DFS links must be in lowercase. New to SAMBA 3.x: A new version of HP CIFS Server, A.02.01.01, was released in February 2005. The information in this paper is equally applicable to this release, which includes ADDITIONAL MS DFS functionality, enabled by the share level option ‘msdfs proxy’. This option effectively allows an entire SHARE to be redirected vi MS DFS referral to a share on another server.
Testing our MS DFS environment Now that we have configured the HP CIFS Server to offer a couple of MS DFS links, let ’s see it in action. For this purpose, we have created a single file on each of the linked shares: \\ceres\shared_stuff: filename=ceres_test.txt \\mccall\shared_stuff: filename = mccall_test.
Let’s use our Windows/XP client ‘mccallevo’ to connect to these shares THROUGH the MS DFS links we have set up on the share \\rkm-nt\dfsroot. Figure 3: MS DFS links 'linka' & 'linkb' Notice from Figure 3 that these links show up as standard folders.
When we click on the ‘linkb’ folder, we get: Figure 4: Contents of 'linkb' And we can see in Figure 4 that, indeed, the file we put on the \\mccall\shared_stuff directory DOES show up. So the redirection through the MS DFS link was successful. We clicked on a ‘directory’ in our \\rkm-nt\dfsroot share, and ended up on the ‘shared_stuff’ share on the ‘ceres’ server.
If we click on the folder ‘linka’, we are also successful. Figure 5: Contents of 'linka' So, we have demonstrated that by connecting to a single HP CIFS Server, ‘rkm-nt’ we are able to actually access files on completely independent servers. How it works The mechanism behind this is interesting. What actually happens behind the scenes is this.
Figure 6: Highlighted line shows client request for info on linka, the MS DFS link.
Figure 7: Highlighted line shows response to the MS DFS referral request from the client - note the 'Node: \ceres\shared_stuff' field in the detail window. This is the actual referral to the 'shared_stuff' share on the server 'ceres'. Redundant MS DFS links You can build some redundancy into your MS DFS links by referencing two or more server\share referrals with the same link. If the FIRST link is unavailable, the client will then attempt to connect to the SECOND link and so forth.
And then, take ‘ceres’ offline. Note the results in the following screen snapshot. Figure 8: Note that the file 'mccall_test.txt' is the file from \\mccall\shared_stuff, since the 1st referral to \\ceres\shared_stuff was unavailable. The failure to find \\ceres\shared_stuff was transparent to the user. NOTE: Both the client AND the server hosting the MS DFS root do some form of caching in regards to links that have been followed.
Troubleshooting MS DFS on HP CIFS Server So, now that we know what it looks like when it WORKS, let’s step through troubleshooting a couple of common problems you might run into. Problem 1: The network path was not found. I have followed the above configuration steps, and my users can connect to the SHARE, but when they click on the MS DFS link, they get the following error.
Figure 10: Trace of a failing MS DFS referral due to client being unable to resolve node name in referral response. In the screen shot for Figure 10, we see the ‘STATUS_PATH_NOT_COVERED’, followed by the ‘GET_DFS_REFERRAL’. THEN we see a number of packets involving name lookup for the server ‘ceres’, who is the server we got a MS DFS referral for. Note the highlighted line ‘Name Query Response’.
But what about the CLIENT? We will use the command prompt window to try to directly attach to the server and share we are being referred to. Figure 11: Using cmd window to check direct access to a server and share As we can see from the above screenshot, the client is not able to get to the referred server/sharename DIRECTLY. The error received is similar to that returned when we tried to follow the MS DFS link.
We could add the ‘ceres’ server and its ip address to the local lmhosts file on the client. Choice # 3 is the simplest from a testing standpoint. So we add the following line to the /windows/system32/drivers/etc/lmhosts file on the client 16.113.9.139 ceres #PRE and reload the remote cache name table on the client from the command prompt.
And NOW, as the screenshot below shows, we are able to successfully follow the MS DFS link. Figure 12: Adding an lmhosts entry and reloading the NetBIOS name cache from the cmd window Naturally, in a production environment, you would want to either use WINS or DNS, to globally resolve name issues across your enterprise rather than having to add entries to the lmhosts file of every client needing to follow this link. But this simple method is very useful for troubleshooting.
Problem 2: Logon failure: unknown username or password. I have followed the above configuration steps and my users can connect to the SHARE but when they click on the MS DFS link, they get the following error.
verify this by having the client attempt to directly connect to the referred server and share returned in the trace, i.e. ‘mccall\shared_stuff’ as shown below using the command prompt window on the client. Figure 15: Using the cmd window to test for valid username/password directly to the referred server At this point, you should have the client contact the administrator of the ‘mccall’ server to set up the necessary username and password for appropriate access to this server.
http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/ Using Samba 2nd Edition, by Ts, Eckstein and Collier-Brown (O'REILLY Press) also available online at: http://us1.samba.org/samba/docs/using_samba/toc.html Implementing CIFS, by Christopher Hertel (Prentice Hall) also available online at: http://www.ubiqx.org/cifs/ Ethereal Users Guide, available online at: http://www.ethereal.com/docs/user-guide/ In addition, there are numerous articles available from Microsoft on MS DFS.
© 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. Itanium is a trademark or registered trademark of Intel Corporation in the U.S.