nfs41-server.txt 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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. - Incomplete backchannel support: incomplete backchannel gss
  35. support and no support for BACKCHANNEL_CTL mean that
  36. callbacks (hence delegations and layouts) may not be
  37. available and clients confused by the incomplete
  38. implementation may fail.
  39. - We do not support SSV, which provides security for shared
  40. client-server state (thus preventing unauthorized tampering
  41. with locks and opens, for example). It is mandatory for
  42. servers to support this, though no clients use it yet.
  43. - Mandatory operations which we do not support, such as
  44. DESTROY_CLIENTID, are not currently used by clients, but will be
  45. (and the spec recommends their uses in common cases), and
  46. clients should not be expected to know how to recover from the
  47. case where they are not supported. This will eventually cause
  48. interoperability failures.
  49. In addition, some limitations are inherited from the current NFSv4
  50. implementation:
  51. - Incomplete delegation enforcement: if a file is renamed or
  52. unlinked by a local process, a client holding a delegation may
  53. continue to indefinitely allow opens of the file under the old
  54. name.
  55. The table below, taken from the NFSv4.1 document, lists
  56. the operations that are mandatory to implement (REQ), optional
  57. (OPT), and NFSv4.0 operations that are required not to implement (MNI)
  58. in minor version 1. The first column indicates the operations that
  59. are not supported yet by the linux server implementation.
  60. The OPTIONAL features identified and their abbreviations are as follows:
  61. pNFS Parallel NFS
  62. FDELG File Delegations
  63. DDELG Directory Delegations
  64. The following abbreviations indicate the linux server implementation status.
  65. I Implemented NFSv4.1 operations.
  66. NS Not Supported.
  67. NS* unimplemented optional feature.
  68. P pNFS features implemented out of tree.
  69. PNS pNFS features that are not supported yet (out of tree).
  70. Operations
  71. +----------------------+------------+--------------+----------------+
  72. | Operation | REQ, REC, | Feature | Definition |
  73. | | OPT, or | (REQ, REC, | |
  74. | | MNI | or OPT) | |
  75. +----------------------+------------+--------------+----------------+
  76. | ACCESS | REQ | | Section 18.1 |
  77. NS | BACKCHANNEL_CTL | REQ | | Section 18.33 |
  78. I | BIND_CONN_TO_SESSION | REQ | | Section 18.34 |
  79. | CLOSE | REQ | | Section 18.2 |
  80. | COMMIT | REQ | | Section 18.3 |
  81. | CREATE | REQ | | Section 18.4 |
  82. I | CREATE_SESSION | REQ | | Section 18.36 |
  83. NS*| DELEGPURGE | OPT | FDELG (REQ) | Section 18.5 |
  84. | DELEGRETURN | OPT | FDELG, | Section 18.6 |
  85. | | | DDELG, pNFS | |
  86. | | | (REQ) | |
  87. NS | DESTROY_CLIENTID | REQ | | Section 18.50 |
  88. I | DESTROY_SESSION | REQ | | Section 18.37 |
  89. I | EXCHANGE_ID | REQ | | Section 18.35 |
  90. I | FREE_STATEID | REQ | | Section 18.38 |
  91. | GETATTR | REQ | | Section 18.7 |
  92. P | GETDEVICEINFO | OPT | pNFS (REQ) | Section 18.40 |
  93. P | GETDEVICELIST | OPT | pNFS (OPT) | Section 18.41 |
  94. | GETFH | REQ | | Section 18.8 |
  95. NS*| GET_DIR_DELEGATION | OPT | DDELG (REQ) | Section 18.39 |
  96. P | LAYOUTCOMMIT | OPT | pNFS (REQ) | Section 18.42 |
  97. P | LAYOUTGET | OPT | pNFS (REQ) | Section 18.43 |
  98. P | LAYOUTRETURN | OPT | pNFS (REQ) | Section 18.44 |
  99. | LINK | OPT | | Section 18.9 |
  100. | LOCK | REQ | | Section 18.10 |
  101. | LOCKT | REQ | | Section 18.11 |
  102. | LOCKU | REQ | | Section 18.12 |
  103. | LOOKUP | REQ | | Section 18.13 |
  104. | LOOKUPP | REQ | | Section 18.14 |
  105. | NVERIFY | REQ | | Section 18.15 |
  106. | OPEN | REQ | | Section 18.16 |
  107. NS*| OPENATTR | OPT | | Section 18.17 |
  108. | OPEN_CONFIRM | MNI | | N/A |
  109. | OPEN_DOWNGRADE | REQ | | Section 18.18 |
  110. | PUTFH | REQ | | Section 18.19 |
  111. | PUTPUBFH | REQ | | Section 18.20 |
  112. | PUTROOTFH | REQ | | Section 18.21 |
  113. | READ | REQ | | Section 18.22 |
  114. | READDIR | REQ | | Section 18.23 |
  115. | READLINK | OPT | | Section 18.24 |
  116. | RECLAIM_COMPLETE | REQ | | Section 18.51 |
  117. | RELEASE_LOCKOWNER | MNI | | N/A |
  118. | REMOVE | REQ | | Section 18.25 |
  119. | RENAME | REQ | | Section 18.26 |
  120. | RENEW | MNI | | N/A |
  121. | RESTOREFH | REQ | | Section 18.27 |
  122. | SAVEFH | REQ | | Section 18.28 |
  123. | SECINFO | REQ | | Section 18.29 |
  124. I | SECINFO_NO_NAME | REC | pNFS files | Section 18.45, |
  125. | | | layout (REQ) | Section 13.12 |
  126. I | SEQUENCE | REQ | | Section 18.46 |
  127. | SETATTR | REQ | | Section 18.30 |
  128. | SETCLIENTID | MNI | | N/A |
  129. | SETCLIENTID_CONFIRM | MNI | | N/A |
  130. NS | SET_SSV | REQ | | Section 18.47 |
  131. I | TEST_STATEID | REQ | | Section 18.48 |
  132. | VERIFY | REQ | | Section 18.31 |
  133. NS*| WANT_DELEGATION | OPT | FDELG (OPT) | Section 18.49 |
  134. | WRITE | REQ | | Section 18.32 |
  135. Callback Operations
  136. +-------------------------+-----------+-------------+---------------+
  137. | Operation | REQ, REC, | Feature | Definition |
  138. | | OPT, or | (REQ, REC, | |
  139. | | MNI | or OPT) | |
  140. +-------------------------+-----------+-------------+---------------+
  141. | CB_GETATTR | OPT | FDELG (REQ) | Section 20.1 |
  142. P | CB_LAYOUTRECALL | OPT | pNFS (REQ) | Section 20.3 |
  143. NS*| CB_NOTIFY | OPT | DDELG (REQ) | Section 20.4 |
  144. P | CB_NOTIFY_DEVICEID | OPT | pNFS (OPT) | Section 20.12 |
  145. NS*| CB_NOTIFY_LOCK | OPT | | Section 20.11 |
  146. NS*| CB_PUSH_DELEG | OPT | FDELG (OPT) | Section 20.5 |
  147. | CB_RECALL | OPT | FDELG, | Section 20.2 |
  148. | | | DDELG, pNFS | |
  149. | | | (REQ) | |
  150. NS*| CB_RECALL_ANY | OPT | FDELG, | Section 20.6 |
  151. | | | DDELG, pNFS | |
  152. | | | (REQ) | |
  153. NS | CB_RECALL_SLOT | REQ | | Section 20.8 |
  154. NS*| CB_RECALLABLE_OBJ_AVAIL | OPT | DDELG, pNFS | Section 20.7 |
  155. | | | (REQ) | |
  156. I | CB_SEQUENCE | OPT | FDELG, | Section 20.9 |
  157. | | | DDELG, pNFS | |
  158. | | | (REQ) | |
  159. NS*| CB_WANTS_CANCELLED | OPT | FDELG, | Section 20.10 |
  160. | | | DDELG, pNFS | |
  161. | | | (REQ) | |
  162. +-------------------------+-----------+-------------+---------------+
  163. Implementation notes:
  164. DELEGPURGE:
  165. * mandatory only for servers that support CLAIM_DELEGATE_PREV and/or
  166. CLAIM_DELEG_PREV_FH (which allows clients to keep delegations that
  167. persist across client reboots). Thus we need not implement this for
  168. now.
  169. EXCHANGE_ID:
  170. * only SP4_NONE state protection supported
  171. * implementation ids are ignored
  172. CREATE_SESSION:
  173. * backchannel attributes are ignored
  174. * backchannel security parameters are ignored
  175. SEQUENCE:
  176. * no support for dynamic slot table renegotiation (optional)
  177. Nonstandard compound limitations:
  178. * No support for a sessions fore channel RPC compound that requires both a
  179. ca_maxrequestsize request and a ca_maxresponsesize reply, so we may
  180. fail to live up to the promise we made in CREATE_SESSION fore channel
  181. negotiation.
  182. * No more than one IO operation (read, write, readdir) allowed per
  183. compound.
  184. See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues.