Limitations of PC/NFS

The NFS protocol is the lingua franca of file-sharing protocols in that it is implemented on the widest variety of operating system environments, both client and server. These environments include Unix (nearly all of them), Windows, NT, MacOS, MVS, OS/400, OS/2, VMS, many real-time operating systems, and systems designed for network-attached storage, such as the ONTAP system for Network Appliance's hardware. One reason why NFS has been so successful is that it is very simple. This simplicity has a price; NFS does not take the approach of supporting every arcane, operating-specific file semantic for all the environments it supports. Using NFS on non-Unix platforms, especially as a client, can limit you. This is very noticeable with PC/NFS. For example, the Windows and NT worlds have notions of enforced locking, which NFS, even via the NFS Lock Manager, does not provide. While PC/NFS implementations do their best to emulate this semantic and others, you will find that some applications work in unexpected ways over NFS.These limitations apply to NFS Versions 2 and 3. NFS Version 4 goes a long way toward supporting Windows and NT file semantics. At the time of this writing, there were no known generally available NFS Version 4 implementations.

NFS versus SMB (CIFS)

SMB stands for Server Message Block and is the file access protocol that is native to Windows and NT. In 1996, Microsoft, the owner of the SMB protocol, renamed SMB to CIFS: the Common Internet File System. However, at the time of this writing, CIFS was not as common as NFS when it came to came to the variety of client implementations. CIFS is, however, growing in the number of server implementations. When you consider the plethora of low-end, network-attached storage boxes aimed at consumers and small office environments, that often support CIFS but not NFS, it is arguable that CIFS has surpassed NFS in the number of unique server implementations. The installed base of Windows and NT desktop computers as compared to non-Windows, non-NT desktops is a big reason for this trend.Unix is becoming a popular platform for CIFS servers. This is likely due to the popularity of the open source package called Samba, which is a CIFS server for Unix platforms. Samba is developed and maintained by a world-wide community of developers dedicated to producing a server as compatible with Microsoft's clients as possible. This is no mean task; at the time of this writing, the shared opinion of many in the CIFS server industry was that published CIFS specifications were inadequate to build a compatible server. The Samba developers, and no doubt other non-Microsoft implementors, have often resorted to using packet sniffers between existing Windows and NT clients and servers to deduce the protocol formats and semantics.The emergence of Samba has led to a massive shift from deploying PC/NFS to deploying Samba instead. This is for at least three reasons:

Why PC/NFS?

With the ubiquity of CIFS servers on Unix platforms, it begs the question, why run NFS on a Windows or NT client? This question was asked of the comp.protocols.smb and comp.protocols.nfs Usenet newsgroups in the summer of 2000. The responses can be summarized as follows: There is one more consideration: reliability. The SMB protocol is based on TCP/IP and is very stateful, like the NFS lock manager. State recovery is very simplistic; when the TCP connection between an SMB client and server is lost, the SMB server removes all state that belongs to the SMB client. There is no mechanism to allow a client to reestablish state. In contrast to the NFS environment, the filing protocol has no state to recover. The NFS environment's locking protocol is stateful, but there is a state recovery mechanism: clients are given a grace period to re-establish state. The consequence of the SMB approach is that a client has a higher opportunity to lose its locks and other valuable state after a server restart than with the NFS environment. Andy Watson and Paul Benn, in a white paper from Network Appliance ("Multiprotocol Data Access: NFS, CIFS, and HTTP," TR3014, Revision 3, May 1999, www.netapp.com), wrote:If a CIFS client attempts file access on an established connection while the server is unavailable (down or not yet finished rebooting), this is effectively the equivalent of a failed disk from the perspective of the application software. In many cases, the application will report an error and allow the user to retry, but some applications will simply hang or exit.At the time this tutorial was written, this statement was true for both Windows ME and Windows. However, there are rumors that future versions of Windows will address this recovery issue.