CIFS Distributed File System Support

The SMB protocol dialects of NTLM 0.12 and later support distributed file system (DFS) operations. A DFS allows a single file naming scheme to span a collection of different servers and shares. The SMB DFS is based on a referral model. The CIFS protocol does not specify the method by which the topological knowledge of the DFS is stored and maintained by the servers.

DFS Referral Request

To request a referral, a client sends a TRANS2_DFS_GET_REFERRAL request containing the DFS path name of interest. The server response indicates how the client should proceed. If the server can resolve the DFS name to a piece of local storage, the local storage will be accessed.

If the server determines that the DFS name actually maps to a different server share, the access to the name will fail with the 32-bit status STATUS_PATH_NOT_COVERED (0xC0000257), or DOS error ERRsrv/ERRbadpath. On receiving this error, the DFS-enabled client should ask the server for a referral (for more information, see SMB_COM_TRANSACTION2:TRANS2_GET_DFS_REFERRAL). The referral request should contain the full file name.

DFS Referral Response

The referral response will contain a list of server and share names to try, and the part of the request file name that junctions to the list of server shares. If the ServerType field of the referral is set to 1 (SMB server), then the client should resubmit the request with the original file name to one of the server shares in the list, once again setting the Flags2 bit 12 bit in the SMB. If ServerType is not 1, then the client should strip off the part of the file name that junctions to the server share before resubmitting the request.

A response to a referral request may elicit a response that does not have the StorageServers bit set. In that case, the client should resubmit the referral request to one of the servers in the list, until it finally obtains a referral response that has the StorageServers bit set, at which point the client can resubmit the request to one of the listed server shares.

If the listed server fails the request with STATUS_PATH_NOT_COVERED, there is an inconsistency between the view of the DFS namespace held by the server granting the referral and the server listed in that referral. The client may inform the server granting the referral of this inconsistency using the TRANS2_REPORT_DFS_INCONSISTENCY command.

If none of the servers in the referral list are able to resolve the DFS request, the client reports this inconsistency to the original server.

See Also

Royalty-Free CIFS Technical Reference License Agreement