nfsd-admin-interfaces.txt 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Administrative interfaces for nfsd
  2. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  3. Note that normally these interfaces are used only by the utilities in
  4. nfs-utils.
  5. nfsd is controlled mainly by pseudofiles under the "nfsd" filesystem,
  6. which is normally mounted at /proc/fs/nfsd/.
  7. The server is always started by the first write of a nonzero value to
  8. nfsd/threads.
  9. Before doing that, NFSD can be told which sockets to listen on by
  10. writing to nfsd/portlist; that write may be:
  11. - an ascii-encoded file descriptor, which should refer to a
  12. bound (and listening, for tcp) socket, or
  13. - "transportname port", where transportname is currently either
  14. "udp", "tcp", or "rdma".
  15. If nfsd is started without doing any of these, then it will create one
  16. udp and one tcp listener at port 2049 (see nfsd_init_socks).
  17. On startup, nfsd and lockd grace periods start.
  18. nfsd is shut down by a write of 0 to nfsd/threads. All locks and state
  19. are thrown away at that point.
  20. Between startup and shutdown, the number of threads may be adjusted up
  21. or down by additional writes to nfsd/threads or by writes to
  22. nfsd/pool_threads.
  23. For more detail about files under nfsd/ and what they control, see
  24. fs/nfsd/nfsctl.c; most of them have detailed comments.
  25. Implementation notes
  26. ^^^^^^^^^^^^^^^^^^^^
  27. Note that the rpc server requires the caller to serialize addition and
  28. removal of listening sockets, and startup and shutdown of the server.
  29. For nfsd this is done using nfsd_mutex.