linux核心檔案翻譯-Fault Injection故障注入__linux

來源:互聯網
上載者:User
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.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.