NFS4.0在NFS3的基础上进行了很大程度的更新:

Feature:

  1. 增加了NFS的状态反馈,自身就实现文件锁功能。
  2. 支持RPCSEC-GSS身份认证,提升了安全性。
  3. NFSv4文件系统的命令空间发生了变化,服务器端必须设置一个根文件系统(fsid=0),其他文件系统挂载在根文件系统上导出。
  4. NFSv4支持delegation。由于多个客户端可以挂载同一个文件系统,为了保持文件同步,NFSv3中客户端需要经常向服务器发起请求,请求文件属性信息,判断其他客户端是否修改了文件。如果文件系统是只读的,或者客户端对文件的修改不频繁,频繁向服务器请求文件属性信息会降低系统性能。NFSv4可以依靠delegation实现文件同步。当客户端A打开一个文件时,服务器会分配给客户端A一个delegation。只要客户端A具有delegation,就可以认为与服务器保持了一致。如果另外一个客户端B访问同一个文件,则服务器会暂缓客户端B的访问请求,向客户端A发送RECALL请求。当客户端A接收到RECALL请求时将本地缓存刷新到服务器中,然后将delegation返回服务器,这时服务器开始处理客户端B的请求。
  5. NFSv4修改了文件属性的表示方法。Mandatory Attributes:
  • 这是文件的基本属性,所有的操作系统必须支持这些属性。
  • Recommended Attributes: 这是NFS建议的属性,如果可能操作系统尽量实现这些属性。

  • Named Attributes: 这是操作系统可以自己实现的一些文件属性。

NFS4.0->4.1

Feature:增加了并行访问,解决NFS大量访问的瓶颈。

Coping with dropped connections as well as client and server crashes is a major concern of distributed file systems. Though NFSv4 improved on earlier NFS versions, problems still remain. NFSv4.1 builds a session layer on top of the transport layer and not only solves many of the earlier problems, but does so in a simpler fashion.

处理掉的连接以及客户端和服务器崩溃是分布式文件系统的主要关注点。虽然NFSv 4在早期的NFS版本上有所改进,但问题仍然存在。NFSv4.1在传输层之上构建会话层,不仅解决了许多早期问题,而且以更简单的方式解决了这些问题。

NFSv4.1 extends the capabilities of its predecessors by supporting high-speed I/O to clustered servers, bringing about parallel I/O and increasing scalability and overall performance. Metadata, such as directory information, may be stored on different servers than data is, keeping it out of the data path. Metadata servers provide clients layout information allowing them to access data servers separately and in parallel.

NFSv4.1通过支持到集群服务器的高速I / O扩展了其前任的功能,实现了并行I / O并提高了可扩展性和整体性能。元数据(如目录信息)可能存储在与数据不同的服务器上,使其不在数据路径中。元数据服务器提供客户端布局信息,允许他们分别和并行地访问数据服务器

Specialized protocols may be used to transfer data between clients and data servers. One such protocol, the NFSv4.1 file protocol, is described in the draft specification, but others such as OSD, an object protocol, and FC, a block protocol, are explicitly made possible. pNFS effectively bridges the gap between Network Attached Storage (NAS) and Storage Area Networks (SAN), giving NFS clients direct and parallel access to storage devices。

专用协议可用于在客户端和数据服务器之间传输数据。在规范草案中描述了一种这样的协议,即NFSv4.1文件协议,但其他协议(如OSD,对象协议和FC,块协议)明确成为可能。 pNFS有效地弥合了网络连接存储(NAS)和存储区域网络(SAN)之间的差距,使NFS客户端可以直接并行访问存储设备。

NFSv4 allows servers to delegate control of files to clients so that, in certain situations, clients may perform operations on files with minimal interaction with the server. NFSv4.1 extends this ability to other kinds of objects, particularly directories.

NFSv4允许服务器将文件控制委托给客户端,以便在某些情况下,客户端可以在与服务器交互最少的情况下对文件执行操作。 NFSv4.1将此功能扩展到其他类型的对象,特别是目录。