📄 rfc3010.txt
字号:
Network Working Group S. SheplerRequest for Comments: 3010 B. CallaghanObsoletes: 1813, 1094 D. RobinsonCategory: Standards Track R. Thurlow Sun Microsystems Inc. C. Beame Hummingbird Ltd. M. Eisler Zambeel, Inc. D. Noveck Network Appliance, Inc. December 2000 NFS version 4 ProtocolStatus of this Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.Copyright Notice Copyright (C) The Internet Society (2000). All Rights Reserved.Abstract NFS (Network File System) version 4 is a distributed file system protocol which owes heritage to NFS protocol versions 2 [RFC1094] and 3 [RFC1813]. Unlike earlier versions, the NFS version 4 protocol supports traditional file access while integrating support for file locking and the mount protocol. In addition, support for strong security (and its negotiation), compound operations, client caching, and internationalization have been added. Of course, attention has been applied to making NFS version 4 operate well in an Internet environment.Key Words The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.Shepler, et al. Standards Track [Page 1]RFC 3010 NFS version 4 Protocol December 2000Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5 1.1. Overview of NFS Version 4 Features . . . . . . . . . . . . 6 1.1.1. RPC and Security . . . . . . . . . . . . . . . . . . . . 6 1.1.2. Procedure and Operation Structure . . . . . . . . . . . 7 1.1.3. File System Model . . . . . . . . . . . . . . . . . . . 8 1.1.3.1. Filehandle Types . . . . . . . . . . . . . . . . . . . 8 1.1.3.2. Attribute Types . . . . . . . . . . . . . . . . . . . 8 1.1.3.3. File System Replication and Migration . . . . . . . . 9 1.1.4. OPEN and CLOSE . . . . . . . . . . . . . . . . . . . . . 9 1.1.5. File locking . . . . . . . . . . . . . . . . . . . . . . 9 1.1.6. Client Caching and Delegation . . . . . . . . . . . . . 10 1.2. General Definitions . . . . . . . . . . . . . . . . . . . 11 2. Protocol Data Types . . . . . . . . . . . . . . . . . . . . 12 2.1. Basic Data Types . . . . . . . . . . . . . . . . . . . . . 12 2.2. Structured Data Types . . . . . . . . . . . . . . . . . . 14 3. RPC and Security Flavor . . . . . . . . . . . . . . . . . . 18 3.1. Ports and Transports . . . . . . . . . . . . . . . . . . . 18 3.2. Security Flavors . . . . . . . . . . . . . . . . . . . . . 18 3.2.1. Security mechanisms for NFS version 4 . . . . . . . . . 19 3.2.1.1. Kerberos V5 as security triple . . . . . . . . . . . . 19 3.2.1.2. LIPKEY as a security triple . . . . . . . . . . . . . 19 3.2.1.3. SPKM-3 as a security triple . . . . . . . . . . . . . 20 3.3. Security Negotiation . . . . . . . . . . . . . . . . . . . 21 3.3.1. Security Error . . . . . . . . . . . . . . . . . . . . . 21 3.3.2. SECINFO . . . . . . . . . . . . . . . . . . . . . . . . 21 3.4. Callback RPC Authentication . . . . . . . . . . . . . . . 22 4. Filehandles . . . . . . . . . . . . . . . . . . . . . . . . 23 4.1. Obtaining the First Filehandle . . . . . . . . . . . . . . 24 4.1.1. Root Filehandle . . . . . . . . . . . . . . . . . . . . 24 4.1.2. Public Filehandle . . . . . . . . . . . . . . . . . . . 24 4.2. Filehandle Types . . . . . . . . . . . . . . . . . . . . . 25 4.2.1. General Properties of a Filehandle . . . . . . . . . . . 25 4.2.2. Persistent Filehandle . . . . . . . . . . . . . . . . . 26 4.2.3. Volatile Filehandle . . . . . . . . . . . . . . . . . . 26 4.2.4. One Method of Constructing a Volatile Filehandle . . . . 28 4.3. Client Recovery from Filehandle Expiration . . . . . . . . 28 5. File Attributes . . . . . . . . . . . . . . . . . . . . . . 29 5.1. Mandatory Attributes . . . . . . . . . . . . . . . . . . . 30 5.2. Recommended Attributes . . . . . . . . . . . . . . . . . . 30 5.3. Named Attributes . . . . . . . . . . . . . . . . . . . . . 31 5.4. Mandatory Attributes - Definitions . . . . . . . . . . . . 31 5.5. Recommended Attributes - Definitions . . . . . . . . . . . 33 5.6. Interpreting owner and owner_group . . . . . . . . . . . . 38 5.7. Character Case Attributes . . . . . . . . . . . . . . . . 39 5.8. Quota Attributes . . . . . . . . . . . . . . . . . . . . . 39 5.9. Access Control Lists . . . . . . . . . . . . . . . . . . . 40Shepler, et al. Standards Track [Page 2]RFC 3010 NFS version 4 Protocol December 2000 5.9.1. ACE type . . . . . . . . . . . . . . . . . . . . . . . . 41 5.9.2. ACE flag . . . . . . . . . . . . . . . . . . . . . . . . 41 5.9.3. ACE Access Mask . . . . . . . . . . . . . . . . . . . . 43 5.9.4. ACE who . . . . . . . . . . . . . . . . . . . . . . . . 44 6. File System Migration and Replication . . . . . . . . . . . 44 6.1. Replication . . . . . . . . . . . . . . . . . . . . . . . 45 6.2. Migration . . . . . . . . . . . . . . . . . . . . . . . . 45 6.3. Interpretation of the fs_locations Attribute . . . . . . . 46 6.4. Filehandle Recovery for Migration or Replication . . . . . 47 7. NFS Server Name Space . . . . . . . . . . . . . . . . . . . 47 7.1. Server Exports . . . . . . . . . . . . . . . . . . . . . . 47 7.2. Browsing Exports . . . . . . . . . . . . . . . . . . . . . 48 7.3. Server Pseudo File System . . . . . . . . . . . . . . . . 48 7.4. Multiple Roots . . . . . . . . . . . . . . . . . . . . . . 49 7.5. Filehandle Volatility . . . . . . . . . . . . . . . . . . 49 7.6. Exported Root . . . . . . . . . . . . . . . . . . . . . . 49 7.7. Mount Point Crossing . . . . . . . . . . . . . . . . . . . 49 7.8. Security Policy and Name Space Presentation . . . . . . . 50 8. File Locking and Share Reservations . . . . . . . . . . . . 50 8.1. Locking . . . . . . . . . . . . . . . . . . . . . . . . . 51 8.1.1. Client ID . . . . . . . . . . . . . . . . . . . . . . . 51 8.1.2. Server Release of Clientid . . . . . . . . . . . . . . . 53 8.1.3. nfs_lockowner and stateid Definition . . . . . . . . . . 54 8.1.4. Use of the stateid . . . . . . . . . . . . . . . . . . . 55 8.1.5. Sequencing of Lock Requests . . . . . . . . . . . . . . 56 8.1.6. Recovery from Replayed Requests . . . . . . . . . . . . 56 8.1.7. Releasing nfs_lockowner State . . . . . . . . . . . . . 57 8.2. Lock Ranges . . . . . . . . . . . . . . . . . . . . . . . 57 8.3. Blocking Locks . . . . . . . . . . . . . . . . . . . . . . 58 8.4. Lease Renewal . . . . . . . . . . . . . . . . . . . . . . 58 8.5. Crash Recovery . . . . . . . . . . . . . . . . . . . . . . 59 8.5.1. Client Failure and Recovery . . . . . . . . . . . . . . 59 8.5.2. Server Failure and Recovery . . . . . . . . . . . . . . 60 8.5.3. Network Partitions and Recovery . . . . . . . . . . . . 62 8.6. Recovery from a Lock Request Timeout or Abort . . . . . . 63 8.7. Server Revocation of Locks . . . . . . . . . . . . . . . . 63 8.8. Share Reservations . . . . . . . . . . . . . . . . . . . . 65 8.9. OPEN/CLOSE Operations . . . . . . . . . . . . . . . . . . 65 8.10. Open Upgrade and Downgrade . . . . . . . . . . . . . . . 66 8.11. Short and Long Leases . . . . . . . . . . . . . . . . . . 66 8.12. Clocks and Calculating Lease Expiration . . . . . . . . . 67 8.13. Migration, Replication and State . . . . . . . . . . . . 67 8.13.1. Migration and State . . . . . . . . . . . . . . . . . . 67 8.13.2. Replication and State . . . . . . . . . . . . . . . . . 68 8.13.3. Notification of Migrated Lease . . . . . . . . . . . . 69 9. Client-Side Caching . . . . . . . . . . . . . . . . . . . . 69 9.1. Performance Challenges for Client-Side Caching . . . . . . 70 9.2. Delegation and Callbacks . . . . . . . . . . . . . . . . . 71Shepler, et al. Standards Track [Page 3]RFC 3010 NFS version 4 Protocol December 2000 9.2.1. Delegation Recovery . . . . . . . . . . . . . . . . . . 72 9.3. Data Caching . . . . . . . . . . . . . . . . . . . . . . . 74 9.3.1. Data Caching and OPENs . . . . . . . . . . . . . . . . . 74 9.3.2. Data Caching and File Locking . . . . . . . . . . . . . 75 9.3.3. Data Caching and Mandatory File Locking . . . . . . . . 77 9.3.4. Data Caching and File Identity . . . . . . . . . . . . . 77 9.4. Open Delegation . . . . . . . . . . . . . . . . . . . . . 78 9.4.1. Open Delegation and Data Caching . . . . . . . . . . . . 80 9.4.2. Open Delegation and File Locks . . . . . . . . . . . . . 82 9.4.3. Recall of Open Delegation . . . . . . . . . . . . . . . 82 9.4.4. Delegation Revocation . . . . . . . . . . . . . . . . . 84 9.5. Data Caching and Revocation . . . . . . . . . . . . . . . 84 9.5.1. Revocation Recovery for Write Open Delegation . . . . . 85 9.6. Attribute Caching . . . . . . . . . . . . . . . . . . . . 85 9.7. Name Caching . . . . . . . . . . . . . . . . . . . . . . . 86 9.8. Directory Caching . . . . . . . . . . . . . . . . . . . . 87 10. Minor Versioning . . . . . . . . . . . . . . . . . . . . . 88 11. Internationalization . . . . . . . . . . . . . . . . . . . 91 11.1. Universal Versus Local Character Sets . . . . . . . . . . 91 11.2. Overview of Universal Character Set Standards . . . . . . 92 11.3. Difficulties with UCS-4, UCS-2, Unicode . . . . . . . . . 93 11.4. UTF-8 and its solutions . . . . . . . . . . . . . . . . . 94 11.5. Normalization . . . . . . . . . . . . . . . . . . . . . . 94 12. Error Definitions . . . . . . . . . . . . . . . . . . . . . 95 13. NFS Version 4 Requests . . . . . . . . . . . . . . . . . . 99 13.1. Compound Procedure . . . . . . . . . . . . . . . . . . . 100 13.2. Evaluation of a Compound Request . . . . . . . . . . . . 100 13.3. Synchronous Modifying Operations . . . . . . . . . . . . 101 13.4. Operation Values . . . . . . . . . . . . . . . . . . . . 102 14. NFS Version 4 Procedures . . . . . . . . . . . . . . . . . 102 14.1. Procedure 0: NULL - No Operation . . . . . . . . . . . . 102 14.2. Procedure 1: COMPOUND - Compound Operations . . . . . . . 102 14.2.1. Operation 3: ACCESS - Check Access Rights . . . . . . . 105 14.2.2. Operation 4: CLOSE - Close File . . . . . . . . . . . . 108 14.2.3. Operation 5: COMMIT - Commit Cached Data . . . . . . . 109 14.2.4. Operation 6: CREATE - Create a Non-Regular File Object. 112 14.2.5. Operation 7: DELEGPURGE - Purge Delegations Awaiting Recovery . . . . . . . . . . . . . . . . . . . . . . . 114 14.2.6. Operation 8: DELEGRETURN - Return Delegation . . . . . 115 14.2.7. Operation 9: GETATTR - Get Attributes . . . . . . . . . 115 14.2.8. Operation 10: GETFH - Get Current Filehandle . . . . . 117 14.2.9. Operation 11: LINK - Create Link to a File . . . . . . 118 14.2.10. Operation 12: LOCK - Create Lock . . . . . . . . . . . 119 14.2.11. Operation 13: LOCKT - Test For Lock . . . . . . . . . 121 14.2.12. Operation 14: LOCKU - Unlock File . . . . . . . . . . 122 14.2.13. Operation 15: LOOKUP - Lookup Filename . . . . . . . . 123 14.2.14. Operation 16: LOOKUPP - Lookup Parent Directory . . . 126Shepler, et al. Standards Track [Page 4]RFC 3010 NFS version 4 Protocol December 2000 14.2.15. Operation 17: NVERIFY - Verify Difference in Attributes . . . . . . . . . . . . . . . . . . . . . . 127 14.2.16. Operation 18: OPEN - Open a Regular File . . . . . . . 128 14.2.17. Operation 19: OPENATTR - Open Named Attribute Directory . . . . . . . . . . . . . . . . . . . . . . 137 14.2.18. Operation 20: OPEN_CONFIRM - Confirm Open . . . . . . 138 14.2.19. Operation 21: OPEN_DOWNGRADE - Reduce Open File Access 140 14.2.20. Operation 22: PUTFH - Set Current Filehandle . . . . . 141 14.2.21. Operation 23: PUTPUBFH - Set Public Filehandle . . . . 142 14.2.22. Operation 24: PUTROOTFH - Set Root Filehandle . . . . 143 14.2.23. Operation 25: READ - Read from File . . . . . . . . . 144 14.2.24. Operation 26: READDIR - Read Directory . . . . . . . . 146 14.2.25. Operation 27: READLINK - Read Symbolic Link . . . . . 150 14.2.26. Operation 28: REMOVE - Remove Filesystem Object . . . 151 14.2.27. Operation 29: RENAME - Rename Directory Entry . . . . 153 14.2.28. Operation 30: RENEW - Renew a Lease . . . . . . . . . 155 14.2.29. Operation 31: RESTOREFH - Restore Saved Filehandle . . 156 14.2.30. Operation 32: SAVEFH - Save Current Filehandle . . . . 157 14.2.31. Operation 33: SECINFO - Obtain Available Security . . 158 14.2.32. Operation 34: SETATTR - Set Attributes . . . . . . . . 160 14.2.33. Operation 35: SETCLIENTID - Negotiate Clientid . . . . 162 14.2.34. Operation 36: SETCLIENTID_CONFIRM - Confirm Clientid . 163 14.2.35. Operation 37: VERIFY - Verify Same Attributes . . . . 164 14.2.36. Operation 38: WRITE - Write to File . . . . . . . . . 166 15. NFS Version 4 Callback Procedures . . . . . . . . . . . . . 170 15.1. Procedure 0: CB_NULL - No Operation . . . . . . . . . . . 170 15.2. Procedure 1: CB_COMPOUND - Compound Operations . . . . . 171 15.2.1. Operation 3: CB_GETATTR - Get Attributes . . . . . . . 172 15.2.2. Operation 4: CB_RECALL - Recall an Open Delegation . . 173 16. Security Considerations . . . . . . . . . . . . . . . . . . 174 17. IANA Considerations . . . . . . . . . . . . . . . . . . . . 174 17.1. Named Attribute Definition . . . . . . . . . . . . . . . 174 18. RPC definition file . . . . . . . . . . . . . . . . . . . . 175 19. Bibliography . . . . . . . . . . . . . . . . . . . . . . . 206 20. Authors . . . . . . . . . . . . . . . . . . . . . . . . . . 210 20.1. Editor's Address . . . . . . . . . . . . . . . . . . . . 210 20.2. Authors' Addresses . . . . . . . . . . . . . . . . . . . 210 20.3. Acknowledgements . . . . . . . . . . . . . . . . . . . . 211 21. Full Copyright Statement . . . . . . . . . . . . . . . . . 2121. Introduction The NFS version 4 protocol is a further revision of the NFS protocol defined already by versions 2 [RFC1094] and 3 [RFC1813]. It retains the essential characteristics of previous versions: design for easy recovery, independent of transport protocols, operating systems and filesystems, simplicity, and good performance. The NFS version 4 revision has the following goals:Shepler, et al. Standards Track [Page 5]RFC 3010 NFS version 4 Protocol December 2000 o Improved access and good performance on the Internet. The protocol is designed to transit firewalls easily, perform well
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -