nfs41-server.txt 12 KB

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