nfsd-admin-interfaces.txt

来源:互联网 发布:mysql怎么查看表的字符 编辑:程序博客网 时间:2024/06/16 17:40
Chinese translated version of Documentation_scheduler_sched-arch.txt
If you have any comment or update to the content, please contact the
original document maintainer directly.  However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help.  Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.

Chinese maintainer: hai0704.hz <hai0704@sina.com>
---------------------------------------------------------------------
Documentation/00-INDEX 的中文翻译

如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。

中文版维护者: 金振海  hai0704.hz <hai0704@sina.com>
中文版翻译者: 金振海  hai0704.hz <hai0704@sina.com>
中文版校译者: 金振海  hai0704.hz <hai0704@sina.com>

 

以下为正文
---------------------------------------------------------------------
Administrative interfaces for nfsd
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nfsd接口管理

Note that normally these interfaces are used only by the utilities in
nfs-utils.
注意这些接口通常被nfs-utils中的公用程序使用。

nfsd is controlled mainly by pseudofiles under the "nfsd" filesystem,
which is normally mounted at /proc/fs/nfsd/.
在“nfsd”文件系统中,nfsd主要被安装在/proc/fs/nfsd/中的pseudofiles控制

The server is always started by the first write of a nonzero value to
nfsd/threads.
对nfsd/threads写入一个非零值后,服务器开始工作

Before doing that, NFSD can be told which sockets to listen on by
writing to nfsd/portlist; that write may be:
在做那些之前,通过写nfsd/portlist,NFSD可以被告知需要监听哪些套接口;
具体写内容可能如下所示:
    - an ascii-encoded file descriptor, which should refer to a
      bound (and listening, for tcp) socket, or
    - "transportname port", where transportname is currently either
      "udp", "tcp", or "rdma".

If nfsd is started without doing any of these, then it will create one
udp and one tcp listener at port 2049 (see nfsd_init_socks).
如果没有做这些就使用nfsd,那么它就会在2049端口(参见 nfsd_init_socks)
创建一个UDP和TCP监听

On startup, nfsd and lockd grace periods start.
在启动时,nfsd和locked的宽限期就开始了。

nfsd is shut down by a write of 0 to nfsd/threads.  All locks and state
are thrown away at that point.
对nfsd/threads写入一个0值nfsd就会被关闭。所有的锁和状态字在这个时候就会
被清空。
Between startup and shutdown, the number of threads may be adjusted up
or down by additional writes to nfsd/threads or by writes to
nfsd/pool_threads.
在启动和关闭这段时间内,线程号可能会被额外的nfsd/threads和
nfsd/pool_threads写操作上下调整。
For more detail about files under nfsd/ and what they control, see
fs/nfsd/nfsctl.c; most of them have detailed comments.
关于在nfsd中的文件细节和控制,请参见fs/nfsd/nfsctl.c;它们大多数有
更详细的注释。
Implementation notes
^^^^^^^^^^^^^^^^^^^^
实现注意事项
Note that the rpc server requires the caller to serialize addition and
removal of listening sockets, and startup and shutdown of the server.
For nfsd this is done using nfsd_mutex.
注意,rpc服务需要调用者序列化添加和删除监听套接字,并且启动和关闭服务器,
这样做是为nfsd使用nfsd互斥。