nfs41-server.txt 11 KB

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