Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

1.3.3. Fencing

Fencing is the disconnection of a node from the cluster's shared storage. Fencing cuts off I/O from shared storage, thus ensuring data integrity. The cluster infrastructure performs fencing through the fence daemon, fenced.
當​​​​​​​ CMAN 發​​​​​​​現​​​​​​​一​​​​​​​個​​​​​​​節​​​​​​​點​​​​​​​已​​​​​​​經​​​​​​​失​​​​​​​效​​​​​​​,它​​​​​​​會​​​​​​​與​​​​​​​其​​​​​​​他​​​​​​​叢​​​​​​​集​​​​​​​架​​​​​​​構​​​​​​​的​​​​​​​元​​​​​​​件​​​​​​​通​​​​​​​訊​​​​​​​,告​​​​​​​知​​​​​​​這​​​​​​​件​​​​​​​事​​​​​​​情​​​​​​​。​​​​​​​fenced 注​​​​​​​意​​​​​​​到​​​​​​​這​​​​​​​問​​​​​​​題​​​​​​​時​​​​​​​,就​​​​​​​會​​​​​​​把​​​​​​​失​​​​​​​效​​​​​​​的​​​​​​​節​​​​​​​點​​​​​​​排​​​​​​​除​​​​​​​在​​​​​​​外​​​​​​​。​​​​​​​其​​​​​​​他​​​​​​​叢​​​​​​​集​​​​​​​架​​​​​​​構​​​​​​​的​​​​​​​元​​​​​​​件​​​​​​​會​​​​​​​決​​​​​​​定​​​​​​​該​​​​​​​採​​​​​​​取​​​​​​​哪​​​​​​​些​​​​​​​措​​​​​​​施​​​​​​​ — 亦​​​​​​​即​​​​​​​採​​​​​​​取​​​​​​​任​​​​​​​何​​​​​​​回​​​​​​​復​​​​​​​措​​​​​​​施​​​​​​​。​​​​​​​舉​​​​​​​ DLM 與​​​​​​​ GFS 為​​​​​​​例​​​​​​​,當​​​​​​​收​​​​​​​到​​​​​​​節​​​​​​​點​​​​​​​失​​​​​​​效​​​​​​​的​​​​​​​通​​​​​​​知​​​​​​​時​​​​​​​,DLM 與​​​​​​​ GFS 會​​​​​​​暫​​​​​​​停​​​​​​​活​​​​​​​動​​​​​​​,直​​​​​​​到​​​​​​​偵​​​​​​​測​​​​​​​到​​​​​​​ fenced 已​​​​​​​經​​​​​​​將​​​​​​​失​​​​​​​效​​​​​​​節​​​​​​​點​​​​​​​排​​​​​​​除​​​​​​​之​​​​​​​後​​​​​​​,才​​​​​​​會​​​​​​​恢​​​​​​​復​​​​​​​運​​​​​​​作​​​​​​​,開​​​​​​​始​​​​​​​進​​​​​​​行​​​​​​​復​​​​​​​原​​​​​​​工​​​​​​​作​​​​​​​。​​​​​​​DLM 會​​​​​​​釋​​​​​​​出​​​​​​​失​​​​​​​效​​​​​​​節​​​​​​​點​​​​​​​的​​​​​​​鎖​​​​​​​定​​​​​​​;GFS 會​​​​​​​回​​​​​​​復​​​​​​​失​​​​​​​效​​​​​​​節​​​​​​​點​​​​​​​的​​​​​​​日​​​​​​​誌​​​​​​​。​​​​​​​
fencing 程​​​​​​​式​​​​​​​會​​​​​​​從​​​​​​​設​​​​​​​定​​​​​​​檔​​​​​​​來​​​​​​​決​​​​​​​定​​​​​​​要​​​​​​​採​​​​​​​取​​​​​​​何​​​​​​​種​​​​​​​ fencing 措​​​​​​​施​​​​​​​。​​​​​​​設​​​​​​​定​​​​​​​檔​​​​​​​中​​​​​​​有​​​​​​​兩​​​​​​​個​​​​​​​主​​​​​​​要​​​​​​​因​​​​​​​素​​​​​​​決​​​​​​​定​​​​​​​ fencing 的​​​​​​​措​​​​​​​施​​​​​​​:排​​​​​​​除​​​​​​​代​​​​​​​理​​​​​​​程​​​​​​​式​​​​​​​(agent)還​​​​​​​是​​​​​​​排​​​​​​​除​​​​​​​裝​​​​​​​置​​​​​​​(device)。​​​​​​​fencing 程​​​​​​​式​​​​​​​會​​​​​​​呼​​​​​​​叫​​​​​​​叢​​​​​​​集​​​​​​​設​​​​​​​定​​​​​​​檔​​​​​​​中​​​​​​​所​​​​​​​指​​​​​​​定​​​​​​​的​​​​​​​代​​​​​​​理​​​​​​​程​​​​​​​式​​​​​​​。​​​​​​​接​​​​​​​著​​​​​​​,代​​​​​​​理​​​​​​​程​​​​​​​式​​​​​​​會​​​​​​​透​​​​​​​過​​​​​​​排​​​​​​​除​​​​​​​裝​​​​​​​置​​​​​​​將​​​​​​​節​​​​​​​點​​​​​​​排​​​​​​​除​​​​​​​在​​​​​​​外​​​​​​​。​​​​​​​當​​​​​​​ fencing 完​​​​​​​成​​​​​​​後​​​​​​​,fencing 程​​​​​​​式​​​​​​​會​​​​​​​通​​​​​​​知​​​​​​​叢​​​​​​​集​​​​​​​管​​​​​​​理​​​​​​​員​​​​​​​。​​​​​​​
Red Hat Cluster Suite 提​​​​​​​供​​​​​​​多​​​​​​​種​​​​​​​ fencing 方​​​​​​​法​​​​​​​:
  • 電​​​​​​​源​​​​​​​ fencing — 把​​​​​​​無​​​​​​​法​​​​​​​運​​​​​​​作​​​​​​​的​​​​​​​節​​​​​​​點​​​​​​​關​​​​​​​機​​​​​​​。​​​​​​​
  • 光​​​​​​​纖​​​​​​​交​​​​​​​換​​​​​​​器​​​​​​​ fencing — 停​​​​​​​止​​​​​​​連​​​​​​​接​​​​​​​儲​​​​​​​存​​​​​​​裝​​​​​​​置​​​​​​​與​​​​​​​失​​​​​​​效​​​​​​​節​​​​​​​點​​​​​​​的​​​​​​​光​​​​​​​纖​​​​​​​連​​​​​​​接​​​​​​​埠​​​​​​​。​​​​​​​
  • GNBD fencing — A fencing method that disables an inoperable node's access to a GNBD server.
  • 其​​​​​​​他​​​​​​​ fencing 方​​​​​​​法​​​​​​​ — 其​​​​​​​他​​​​​​​停​​​​​​​止​​​​​​​ I/O 或​​​​​​​關​​​​​​​閉​​​​​​​失​​​​​​​效​​​​​​​節​​​​​​​點​​​​​​​的​​​​​​​方​​​​​​​法​​​​​​​,包​​​​​​​括​​​​​​​ IBM Bladecenter、​​​​​​​PAP、​​​​​​​DRAC/MC、​​​​​​​HP ILO、​​​​​​​IPMI、​​​​​​​IBM RSA II 等​​​​​​​等​​​​​​​。​​​​​​​
圖形 1.3, “Power Fencing Example” shows an example of power fencing. In the example, the fencing program in node A causes the power controller to power off node D. 圖形 1.4, “Fibre Channel Switch Fencing Example” shows an example of Fibre Channel switch fencing. In the example, the fencing program in node A causes the Fibre Channel switch to disable the port for node D, disconnecting node D from storage.
Power Fencing Example

圖形 1.3. Power Fencing Example

Fibre Channel Switch Fencing Example

圖形 1.4. Fibre Channel Switch Fencing Example

指​​​​​​​定​​​​​​​ fencing 的​​​​​​​方​​​​​​​法​​​​​​​,其​​​​​​​中​​​​​​​包​​​​​​​含​​​​​​​編​​​​​​​輯​​​​​​​叢​​​​​​​集​​​​​​​設​​​​​​​定​​​​​​​檔​​​​​​​,以​​​​​​​指​​​​​​​定​​​​​​​ fencing 方​​​​​​​法​​​​​​​的​​​​​​​名​​​​​​​稱​​​​​​​、​​​​​​​fencing 代​​​​​​​理​​​​​​​程​​​​​​​式​​​​​​​、​​​​​​​以​​​​​​​及​​​​​​​叢​​​​​​​集​​​​​​​中​​​​​​​每​​​​​​​個​​​​​​​裝​​​​​​​置​​​​​​​的​​​​​​​ fencing 裝​​​​​​​置​​​​​​​。​​​​​​​
The way in which a fencing method is specified depends on if a node has either dual power supplies or multiple paths to storage. If a node has dual power supplies, then the fencing method for the node must specify at least two fencing devices — one fencing device for each power supply (refer to 圖形 1.5, “Fencing a Node with Dual Power Supplies”). Similarly, if a node has multiple paths to Fibre Channel storage, then the fencing method for the node must specify one fencing device for each path to Fibre Channel storage. For example, if a node has two paths to Fibre Channel storage, the fencing method should specify two fencing devices — one for each path to Fibre Channel storage (refer to 圖形 1.6, “Fencing a Node with Dual Fibre Channel Connections”).
Fencing a Node with Dual Power Supplies

圖形 1.5. Fencing a Node with Dual Power Supplies

Fencing a Node with Dual Fibre Channel Connections

圖形 1.6. Fencing a Node with Dual Fibre Channel Connections

一​​​​​​​個​​​​​​​節​​​​​​​點​​​​​​​可​​​​​​​以​​​​​​​設​​​​​​​定​​​​​​​一​​​​​​​或​​​​​​​多​​​​​​​個​​​​​​​ fencing 方​​​​​​​法​​​​​​​。​​​​​​​當​​​​​​​使​​​​​​​用​​​​​​​一​​​​​​​個​​​​​​​ fencing 方​​​​​​​法​​​​​​​時​​​​​​​,它​​​​​​​會​​​​​​​是​​​​​​​ fence 該​​​​​​​節​​​​​​​點​​​​​​​的​​​​​​​唯​​​​​​​一​​​​​​​方​​​​​​​式​​​​​​​。​​​​​​​當​​​​​​​您​​​​​​​為​​​​​​​一​​​​​​​個​​​​​​​節​​​​​​​點​​​​​​​使​​​​​​​用​​​​​​​多​​​​​​​個​​​​​​​ fencing 方​​​​​​​法​​​​​​​時​​​​​​​,這​​​​​​​些​​​​​​​方​​​​​​​法​​​​​​​會​​​​​​​根​​​​​​​據​​​​​​​叢​​​​​​​集​​​​​​​設​​​​​​​定​​​​​​​檔​​​​​​​中​​​​​​​的​​​​​​​設​​​​​​​定​​​​​​​,按​​​​​​​順​​​​​​​序​​​​​​​ cascaded(串​​​​​​​聯​​​​​​​)在​​​​​​​一​​​​​​​起​​​​​​​。​​​​​​​如​​​​​​​果​​​​​​​一​​​​​​​個​​​​​​​節​​​​​​​點​​​​​​​失​​​​​​​效​​​​​​​,它​​​​​​​會​​​​​​​使​​​​​​​用​​​​​​​設​​​​​​​定​​​​​​​檔​​​​​​​中​​​​​​​的​​​​​​​第​​​​​​​一​​​​​​​個​​​​​​​ fencing 方​​​​​​​法​​​​​​​。​​​​​​​如​​​​​​​果​​​​​​​第​​​​​​​一​​​​​​​個​​​​​​​方​​​​​​​法​​​​​​​不​​​​​​​成​​​​​​​功​​​​​​​,就​​​​​​​會​​​​​​​使​​​​​​​用​​​​​​​設​​​​​​​定​​​​​​​檔​​​​​​​中​​​​​​​的​​​​​​​第​​​​​​​二​​​​​​​個​​​​​​​方​​​​​​​法​​​​​​​。​​​​​​​如​​​​​​​果​​​​​​​所​​​​​​​有​​​​​​​方​​​​​​​法​​​​​​​都​​​​​​​不​​​​​​​成​​​​​​​功​​​​​​​,那​​​​​​​麼​​​​​​​系​​​​​​​統​​​​​​​會​​​​​​​回​​​​​​​去​​​​​​​嘗​​​​​​​試​​​​​​​第​​​​​​​一​​​​​​​個​​​​​​​方​​​​​​​法​​​​​​​,走​​​​​​​過​​​​​​​整​​​​​​​個​​​​​​​順​​​​​​​序​​​​​​​,直​​​​​​​到​​​​​​​節​​​​​​​點​​​​​​​被​​​​​​​ fence 為​​​​​​​止​​​​​​​。​​​​​​​