nfs41-server.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. NFSv4.1 Server Implementation
  2. Server support for minorversion 1 can be controlled using the
  3. /proc/fs/nfsd/versions control file. The string output returned
  4. by reading this file will contain either "+4.1" or "-4.1"
  5. correspondingly.
  6. Currently, server support for minorversion 1 is disabled by default.
  7. It can be enabled at run time by writing the string "+4.1" to
  8. the /proc/fs/nfsd/versions control file. Note that to write this
  9. control file, the nfsd service must be taken down. Use your user-mode
  10. nfs-utils to set this up; see rpc.nfsd(8)
  11. (Warning: older servers will interpret "+4.1" and "-4.1" as "+4" and
  12. "-4", respectively. Therefore, code meant to work on both new and old
  13. kernels must turn 4.1 on or off *before* turning support for version 4
  14. on or off; rpc.nfsd does this correctly.)
  15. The NFSv4 minorversion 1 (NFSv4.1) implementation in nfsd is based
  16. on the latest NFSv4.1 Internet Draft:
  17. http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion1-29
  18. From the many new features in NFSv4.1 the current implementation
  19. focuses on the mandatory-to-implement NFSv4.1 Sessions, providing
  20. "exactly once" semantics and better control and throttling of the
  21. resources allocated for each client.
  22. Other NFSv4.1 features, Parallel NFS operations in particular,
  23. are still under development out of tree.
  24. See http://wiki.linux-nfs.org/wiki/index.php/PNFS_prototype_design
  25. for more information.
  26. The current implementation is intended for developers only: while it
  27. does support ordinary file operations on clients we have tested against
  28. (including the linux client), it is incomplete in ways which may limit
  29. features unexpectedly, cause known bugs in rare cases, or cause
  30. interoperability problems with future clients. Known issues:
  31. - gss support is questionable: currently mounts with kerberos
  32. from a linux client are possible, but we aren't really
  33. conformant with the spec (for example, we don't use kerberos
  34. on the backchannel correctly).
  35. - no trunking support: no clients currently take advantage of
  36. trunking, but this is a mandatory failure, and its use is
  37. recommended to clients in a number of places. (E.g. to ensure
  38. timely renewal in case an existing connection's retry timeouts
  39. have gotten too long; see section 8.3 of the draft.)
  40. Therefore, lack of this feature may cause future clients to
  41. fail.
  42. - Incomplete backchannel support: incomplete backchannel gss
  43. support and no support for BACKCHANNEL_CTL mean that
  44. callbacks (hence delegations and layouts) may not be
  45. available and clients confused by the incomplete
  46. implementation may fail.
  47. - Server reboot recovery is unsupported; if the server reboots,
  48. clients may fail.
  49. - We do not support SSV, which provides security for shared
  50. client-server state (thus preventing unauthorized tampering
  51. with locks and opens, for example). It is mandatory for
  52. servers to support this, though no clients use it yet.
  53. - Mandatory operations which we do not support, such as
  54. DESTROY_CLIENTID, FREE_STATEID, SECINFO_NO_NAME, and
  55. TEST_STATEID, are not currently used by clients, but will be
  56. (and the spec recommends their uses in common cases), and
  57. clients should not be expected to know how to recover from the
  58. case where they are not supported. This will eventually cause
  59. interoperability failures.
  60. In addition, some limitations are inherited from the current NFSv4
  61. implementation:
  62. - Incomplete delegation enforcement: if a file is renamed or
  63. unlinked, a client holding a delegation may continue to
  64. indefinitely allow opens of the file under the old name.
  65. The table below, taken from the NFSv4.1 document, lists
  66. the operations that are mandatory to implement (REQ), optional
  67. (OPT), and NFSv4.0 operations that are required not to implement (MNI)
  68. in minor version 1. The first column indicates the operations that
  69. are not supported yet by the linux server implementation.
  70. The OPTIONAL features identified and their abbreviations are as follows:
  71. pNFS Parallel NFS
  72. FDELG File Delegations
  73. DDELG Directory Delegations
  74. The following abbreviations indicate the linux server implementation status.
  75. I Implemented NFSv4.1 operations.
  76. NS Not Supported.
  77. NS* unimplemented optional feature.
  78. P pNFS features implemented out of tree.
  79. PNS pNFS features that are not supported yet (out of tree).
  80. Operations
  81. +----------------------+------------+--------------+----------------+
  82. | Operation | REQ, REC, | Feature | Definition |
  83. | | OPT, or | (REQ, REC, | |
  84. | | MNI | or OPT) | |
  85. +----------------------+------------+--------------+----------------+
  86. | ACCESS | REQ | | Section 18.1 |
  87. NS | BACKCHANNEL_CTL | REQ | | Section 18.33 |
  88. NS | BIND_CONN_TO_SESSION | REQ | | Section 18.34 |
  89. | CLOSE | REQ | | Section 18.2 |
  90. | COMMIT | REQ | | Section 18.3 |
  91. | CREATE | REQ | | Section 18.4 |
  92. I | CREATE_SESSION | REQ | | Section 18.36 |
  93. NS*| DELEGPURGE | OPT | FDELG (REQ) | Section 18.5 |
  94. | DELEGRETURN | OPT | FDELG, | Section 18.6 |
  95. | | | DDELG, pNFS | |
  96. | | | (REQ) | |
  97. NS | DESTROY_CLIENTID | REQ | | Section 18.50 |
  98. I | DESTROY_SESSION | REQ | | Section 18.37 |
  99. I | EXCHANGE_ID | REQ | | Section 18.35 |
  100. NS | FREE_STATEID | REQ | | Section 18.38 |
  101. | GETATTR | REQ | | Section 18.7 |
  102. P | GETDEVICEINFO | OPT | pNFS (REQ) | Section 18.40 |
  103. P | GETDEVICELIST | OPT | pNFS (OPT) | Section 18.41 |
  104. | GETFH | REQ | | Section 18.8 |
  105. NS*| GET_DIR_DELEGATION | OPT | DDELG (REQ) | Section 18.39 |
  106. P | LAYOUTCOMMIT | OPT | pNFS (REQ) | Section 18.42 |
  107. P | LAYOUTGET | OPT | pNFS (REQ) | Section 18.43 |
  108. P | LAYOUTRETURN | OPT | pNFS (REQ) | Section 18.44 |
  109. | LINK | OPT | | Section 18.9 |
  110. | LOCK | REQ | | Section 18.10 |
  111. | LOCKT | REQ | | Section 18.11 |
  112. | LOCKU | REQ | | Section 18.12 |
  113. | LOOKUP | REQ | | Section 18.13 |
  114. | LOOKUPP | REQ | | Section 18.14 |
  115. | NVERIFY | REQ | | Section 18.15 |
  116. | OPEN | REQ | | Section 18.16 |
  117. NS*| OPENATTR | OPT | | Section 18.17 |
  118. | OPEN_CONFIRM | MNI | | N/A |
  119. | OPEN_DOWNGRADE | REQ | | Section 18.18 |
  120. | PUTFH | REQ | | Section 18.19 |
  121. | PUTPUBFH | REQ | | Section 18.20 |
  122. | PUTROOTFH | REQ | | Section 18.21 |
  123. | READ | REQ | | Section 18.22 |
  124. | READDIR | REQ | | Section 18.23 |
  125. | READLINK | OPT | | Section 18.24 |
  126. NS | RECLAIM_COMPLETE | REQ | | Section 18.51 |
  127. | RELEASE_LOCKOWNER | MNI | | N/A |
  128. | REMOVE | REQ | | Section 18.25 |
  129. | RENAME | REQ | | Section 18.26 |
  130. | RENEW | MNI | | N/A |
  131. | RESTOREFH | REQ | | Section 18.27 |
  132. | SAVEFH | REQ | | Section 18.28 |
  133. | SECINFO | REQ | | Section 18.29 |
  134. NS | SECINFO_NO_NAME | REC | pNFS files | Section 18.45, |
  135. | | | layout (REQ) | Section 13.12 |
  136. I | SEQUENCE | REQ | | Section 18.46 |
  137. | SETATTR | REQ | | Section 18.30 |
  138. | SETCLIENTID | MNI | | N/A |
  139. | SETCLIENTID_CONFIRM | MNI | | N/A |
  140. NS | SET_SSV | REQ | | Section 18.47 |
  141. NS | TEST_STATEID | REQ | | Section 18.48 |
  142. | VERIFY | REQ | | Section 18.31 |
  143. NS*| WANT_DELEGATION | OPT | FDELG (OPT) | Section 18.49 |
  144. | WRITE | REQ | | Section 18.32 |
  145. Callback Operations
  146. +-------------------------+-----------+-------------+---------------+
  147. | Operation | REQ, REC, | Feature | Definition |
  148. | | OPT, or | (REQ, REC, | |
  149. | | MNI | or OPT) | |
  150. +-------------------------+-----------+-------------+---------------+
  151. | CB_GETATTR | OPT | FDELG (REQ) | Section 20.1 |
  152. P | CB_LAYOUTRECALL | OPT | pNFS (REQ) | Section 20.3 |
  153. NS*| CB_NOTIFY | OPT | DDELG (REQ) | Section 20.4 |
  154. P | CB_NOTIFY_DEVICEID | OPT | pNFS (OPT) | Section 20.12 |
  155. NS*| CB_NOTIFY_LOCK | OPT | | Section 20.11 |
  156. NS*| CB_PUSH_DELEG | OPT | FDELG (OPT) | Section 20.5 |
  157. | CB_RECALL | OPT | FDELG, | Section 20.2 |
  158. | | | DDELG, pNFS | |
  159. | | | (REQ) | |
  160. NS*| CB_RECALL_ANY | OPT | FDELG, | Section 20.6 |
  161. | | | DDELG, pNFS | |
  162. | | | (REQ) | |
  163. NS | CB_RECALL_SLOT | REQ | | Section 20.8 |
  164. NS*| CB_RECALLABLE_OBJ_AVAIL | OPT | DDELG, pNFS | Section 20.7 |
  165. | | | (REQ) | |
  166. I | CB_SEQUENCE | OPT | FDELG, | Section 20.9 |
  167. | | | DDELG, pNFS | |
  168. | | | (REQ) | |
  169. NS*| CB_WANTS_CANCELLED | OPT | FDELG, | Section 20.10 |
  170. | | | DDELG, pNFS | |
  171. | | | (REQ) | |
  172. +-------------------------+-----------+-------------+---------------+
  173. Implementation notes:
  174. DELEGPURGE:
  175. * mandatory only for servers that support CLAIM_DELEGATE_PREV and/or
  176. CLAIM_DELEG_PREV_FH (which allows clients to keep delegations that
  177. persist across client reboots). Thus we need not implement this for
  178. now.
  179. EXCHANGE_ID:
  180. * only SP4_NONE state protection supported
  181. * implementation ids are ignored
  182. CREATE_SESSION:
  183. * backchannel attributes are ignored
  184. * backchannel security parameters are ignored
  185. SEQUENCE:
  186. * no support for dynamic slot table renegotiation (optional)
  187. nfsv4.1 COMPOUND rules:
  188. The following cases aren't supported yet:
  189. * Enforcing of NFS4ERR_NOT_ONLY_OP for: BIND_CONN_TO_SESSION, CREATE_SESSION,
  190. DESTROY_CLIENTID, DESTROY_SESSION, EXCHANGE_ID.
  191. * DESTROY_SESSION MUST be the final operation in the COMPOUND request.