linux内核文件翻译-Fault Injection故障注入

Chinese translated version of Documentation/namespaces/resource-control.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: 田雨 479103577@qq.com
---------------------------------------------------------------------
Documentation/namespaces/resource-control.txt 的中文翻译
如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。
中文版维护者: 田雨 479103577@qq.com
中文版翻译者: 田雨 479103577@qq.com
中文版校译者: 田雨 479103577@qq.com 
  2 Fault Injection
  3 =故障注入==============
  4 Fault injection is a method for forcing errors that may not normally occur, or
  5 may be difficult to reproduce.  Forcing these errors in a controlled environment
  6 can help the developer find and fix bugs before their code is shipped in a
  7 production system.  Injecting an error on the Linux NFS server will allow us to
  8 observe how the client reacts and if it manages to recover its state correctly.
  9 故障注入是一种方法,用于迫使错误,可能通常不发生,或
  可以是很难重现。迫使这些错误在受控环境中
  可以帮助开发人员找到并修复错误代码出厂前在
  生产系统。注射Linux的NFS服务器上的错误将使我们能够
  观察客户反应如何,如果它正确管理,以恢复其状态。
 10 NFSD_FAULT_INJECTION must be selected when configuring the kernel to use this
 11 feature.
 12配置内核使用时,必须选择NFSD_FAULT_INJECTION
 11功能。 
 13 
 14 Using Fault Injection
 15 使用故障注入=====================
 16 On the client, mount the fault injection server through NFS v4.0+ and do some
 17 work over NFS (open files, take locks, ...).
 18 在客户端,安装故障注入服务器通过NFS V4.0+和做一些
 17个工作在NFS(打开的文件,采取锁,...)。
 19 On the server, mount the debugfs filesystem to <debug_dir> and ls
 20 <debug_dir>/nfsd.  This will show a list of files that will be used for
 21 injecting faults on the NFS server.  As root, write a number n to the file
 22 corresponding to the action you want the server to take.  The server will then
 23 process the first n items it finds.  So if you want to forget 5 locks, echo '5'
 24 to <debug_dir>/nfsd/forget_locks.  A value of 0 will tell the server to forget
 25 all corresponding items.  A log message will be created containing the number
 26 of items forgotten (check dmesg).
 27 在服务器上安装的debugfs的文件系统<debug_dir>和ls
 <debug_dir>/ nfsd的。这将显示的文件的列表,将被用于
 注射NFS服务器上的故障。作为根,写一个数n的文件
 你想在服务器采取的行动对应。然后,服务器将
 过程中,前n项和它的发现。所以,如果你想忘记的5个水闸,回声'5'
 至<debug_dir>//的nfsd forget_locks的。值为0时会告诉服务器忘记
 所有相应的项目。将创建一个日志消息,包含数字
 遗忘的项目(检查dmesg的)。
 28 Go back to work on the client and check if the client recovered from the error
 29 correctly.
 30 回去工作在客户端上,并检查客户端从错误中恢复
    正确。
 31 
 32 Available Faults
 33 ==可用的故障==============
 34 forget_clients:
 35      The NFS server keeps a list of clients that have placed a mount call.  If
 36      this list is cleared, the server will have no knowledge of who the client
 37      is, forcing the client to reauthenticate with the server.
 38 forget_clients:
    NFS服务器的客户端放置了一个安装呼叫保持列表。如果
    这个名单被清除,谁的客户端服务器将不具备的知识
   迫使客户端与服务器进行重新认证。
 39 forget_openowners:
 40      The NFS server keeps a list of what files are currently opened and who
 41      they were opened by.  Clearing this list will force the client to reopen
 42      its files.
 43 forget_openowners:
  NFS服务器保存了哪些文件正在打开,谁
 他们打开。清除该列表将强制客户端重新打开
 文件。
 


 44 forget_locks:
 45      The NFS server keeps a list of what files are currently locked in the VFS.
 46      Clearing this list will force the client to reclaim its locks (files are
 47      unlocked through the VFS as they are cleared from this list).
 48 forget_locks:
  NFS服务器保持目前锁定在VFS哪些文件的列表。
 清除这个名单将迫使客户端来回收它的锁(文件
 解锁通过VFS,因为它们是从该列表中清除)。
 49 forget_delegations:
 50      A delegation is used to assure the client that a file, or part of a file,
 51      has not changed since the delegation was awarded.  Clearing this list will
 52      force the client to reaquire its delegation before accessing the file
 53      again.
 54 forget_delegations:
 一个代表团,以保证客户端文件,或者文件的一部分,
 并没有改变,因为被授予代表团。清除该列表
 力的客户端reaquire的代表团在访问文件前
 再次。
 55 recall_delegations:
 56      Delegations can be recalled by the server when another client attempts to
 57      access a file.  This test will notify the client that its delegation has
 58      been revoked, forcing the client to reaquire the delegation before using
 59      the file again.
 60 recall_delegations:
 个代表团时由服务器可以调用另一个客户端尝试
 访问一个文件。这个测试将通知客户其代表团
 被撤销,迫使客户使用前reaquire代表团
 该文件。


 61 
 62 tools/nfs/inject_faults.sh script
 63 =工具/ NFS/ inject_faults.sh的脚本================================
 64 This script has been created to ease the fault injection process.  This script
 65 will detect the mounted debugfs directory and write to the files located there
 66 based on the arguments passed by the user.  For example, running
 此脚本已创建缓解故障注入过程。这个脚本
 65将检测安装的debugfs设在那里的文件,目录和写
 66基于由用户传递的参数。例如,运行
 67:`inject_faults.sh forget_locks1`根指示服务器
 
 67 `inject_faults.sh forget_locks 1` as root will instruct the server to forget
 68 one lock.  Running `inject_faults forget_locks` will instruct the server to
 69 forgetall locks.
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值