Red Hat Training

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

1.4. 高​​​​​​​可​​​​​​​用​​​​​​​性​​​​​​​服​​​​​​​務​​​​​​​的​​​​​​​管​​​​​​​理​​​​​​​

「​​​​​​​高​​​​​​​可​​​​​​​用​​​​​​​性​​​​​​​服​​​​​​​務​​​​​​​管​​​​​​​理​​​​​​​」​​​​​​​為​​​​​​​ Red Hat 叢​​​​​​​集​​​​​​​提​​​​​​​供​​​​​​​了​​​​​​​建​​​​​​​立​​​​​​​、​​​​​​​管​​​​​​​理​​​​​​​高​​​​​​​可​​​​​​​用​​​​​​​性​​​​​​​的​​​​​​​叢​​​​​​​集​​​​​​​服​​​​​​​務​​​​​​​(cluster service)。​​​​​​​Red Hat 叢​​​​​​​集​​​​​​​的​​​​​​​高​​​​​​​可​​​​​​​用​​​​​​​性​​​​​​​服​​​​​​​務​​​​​​​管​​​​​​​理​​​​​​​的​​​​​​​主​​​​​​​要​​​​​​​元​​​​​​​件​​​​​​​,rgmanager,能​​​​​​​為​​​​​​​應​​​​​​​用​​​​​​​程​​​​​​​式​​​​​​​提​​​​​​​供​​​​​​​即​​​​​​​時​​​​​​​可​​​​​​​用​​​​​​​的​​​​​​​冷​​​​​​​備​​​​​​​援​​​​​​​(cold failover)。​​​​​​​在​​​​​​​ Red Hat 叢​​​​​​​集​​​​​​​裡​​​​​​​,應​​​​​​​用​​​​​​​程​​​​​​​式​​​​​​​是​​​​​​​被​​​​​​​設​​​​​​​定​​​​​​​為​​​​​​​其​​​​​​​他​​​​​​​叢​​​​​​​集​​​​​​​資​​​​​​​源​​​​​​​,以​​​​​​​組​​​​​​​成​​​​​​​高​​​​​​​效​​​​​​​能​​​​​​​的​​​​​​​叢​​​​​​​集​​​​​​​服​​​​​​​務​​​​​​​。​​​​​​​高​​​​​​​效​​​​​​​能​​​​​​​叢​​​​​​​集​​​​​​​服​​​​​​​務​​​​​​​可​​​​​​​以​​​​​​​從​​​​​​​一​​​​​​​個​​​​​​​節​​​​​​​點​​​​​​​備​​​​​​​援​​​​​​​到​​​​​​​另​​​​​​​一​​​​​​​個​​​​​​​節​​​​​​​點​​​​​​​,使​​​​​​​用​​​​​​​叢​​​​​​​集​​​​​​​的​​​​​​​用​​​​​​​戶​​​​​​​並​​​​​​​不​​​​​​​會​​​​​​​感​​​​​​​受​​​​​​​到​​​​​​​明​​​​​​​顯​​​​​​​的​​​​​​​中​​​​​​​斷​​​​​​​。​​​​​​​會​​​​​​​發​​​​​​​生​​​​​​​叢​​​​​​​集​​​​​​​服​​​​​​​務​​​​​​​備​​​​​​​援​​​​​​​,是​​​​​​​因​​​​​​​為​​​​​​​叢​​​​​​​集​​​​​​​節​​​​​​​點​​​​​​​失​​​​​​​效​​​​​​​,或​​​​​​​叢​​​​​​​集​​​​​​​系​​​​​​​統​​​​​​​管​​​​​​​理​​​​​​​者​​​​​​​將​​​​​​​服​​​​​​​務​​​​​​​從​​​​​​​一​​​​​​​個​​​​​​​節​​​​​​​點​​​​​​​移​​​​​​​到​​​​​​​另​​​​​​​一​​​​​​​個​​​​​​​節​​​​​​​點​​​​​​​(例​​​​​​​如​​​​​​​停​​​​​​​機​​​​​​​檢​​​​​​​查​​​​​​​一​​​​​​​台​​​​​​​節​​​​​​​點​​​​​​​)。​​​​​​​
要​​​​​​​建​​​​​​​立​​​​​​​高​​​​​​​可​​​​​​​用​​​​​​​性​​​​​​​的​​​​​​​服​​​​​​​務​​​​​​​,您​​​​​​​必​​​​​​​須​​​​​​​在​​​​​​​叢​​​​​​​集​​​​​​​設​​​​​​​定​​​​​​​檔​​​​​​​裡​​​​​​​設​​​​​​​定​​​​​​​。​​​​​​​叢​​​​​​​集​​​​​​​服​​​​​​​務​​​​​​​包​​​​​​​括​​​​​​​叢​​​​​​​集​​​​​​​資​​​​​​​源​​​​​​​(resource)。​​​​​​​叢​​​​​​​集​​​​​​​資​​​​​​​源​​​​​​​是​​​​​​​您​​​​​​​建​​​​​​​立​​​​​​​、​​​​​​​管​​​​​​​理​​​​​​​叢​​​​​​​集​​​​​​​設​​​​​​​定​​​​​​​檔​​​​​​​的​​​​​​​基​​​​​​​石​​​​​​​ — 舉​​​​​​​例​​​​​​​來​​​​​​​說​​​​​​​,一​​​​​​​組​​​​​​​ IP 位​​​​​​​址​​​​​​​、​​​​​​​一​​​​​​​個​​​​​​​啟​​​​​​​動​​​​​​​程​​​​​​​式​​​​​​​的​​​​​​​程​​​​​​​序​​​​​​​檔​​​​​​​、​​​​​​​或​​​​​​​是​​​​​​​一​​​​​​​個​​​​​​​ Red Hat GFS 的​​​​​​​共​​​​​​​享​​​​​​​分​​​​​​​割​​​​​​​區​​​​​​​。​​​​​​​
You can associate a cluster service with a failover domain. A failover domain is a subset of cluster nodes that are eligible to run a particular cluster service (refer to 圖形 1.9, “備​​​​​​​援​​​​​​​區​​​​​​​域​​​​​​​”).

注意

備​​​​​​​援​​​​​​​區​​​​​​​域​​​​​​​並​​​​​​​「​​​​​​​不​​​​​​​」​​​​​​​需​​​​​​​要​​​​​​​操​​​​​​​作​​​​​​​。​​​​​​​
叢​​​​​​​集​​​​​​​服​​​​​​​務​​​​​​​一​​​​​​​次​​​​​​​只​​​​​​​能​​​​​​​在​​​​​​​節​​​​​​​點​​​​​​​上​​​​​​​執​​​​​​​行​​​​​​​,以​​​​​​​保​​​​​​​持​​​​​​​資​​​​​​​料​​​​​​​的​​​​​​​完​​​​​​​整​​​​​​​性​​​​​​​。​​​​​​​您​​​​​​​可​​​​​​​以​​​​​​​指​​​​​​​定​​​​​​​備​​​​​​​援​​​​​​​區​​​​​​​域​​​​​​​的​​​​​​​備​​​​​​​援​​​​​​​優​​​​​​​先​​​​​​​順​​​​​​​序​​​​​​​。​​​​​​​指​​​​​​​定​​​​​​​備​​​​​​​援​​​​​​​的​​​​​​​優​​​​​​​先​​​​​​​順​​​​​​​序​​​​​​​包​​​​​​​含​​​​​​​指​​​​​​​定​​​​​​​備​​​​​​​援​​​​​​​區​​​​​​​域​​​​​​​中​​​​​​​每​​​​​​​個​​​​​​​節​​​​​​​點​​​​​​​的​​​​​​​優​​​​​​​先​​​​​​​等​​​​​​​級​​​​​​​。​​​​​​​優​​​​​​​先​​​​​​​等​​​​​​​級​​​​​​​會​​​​​​​決​​​​​​​定​​​​​​​備​​​​​​​援​​​​​​​的​​​​​​​順​​​​​​​序​​​​​​​ — 亦​​​​​​​即​​​​​​​決​​​​​​​定​​​​​​​叢​​​​​​​集​​​​​​​服​​​​​​​務​​​​​​​該​​​​​​​被​​​​​​​備​​​​​​​援​​​​​​​到​​​​​​​哪​​​​​​​個​​​​​​​節​​​​​​​點​​​​​​​。​​​​​​​如​​​​​​​果​​​​​​​您​​​​​​​不​​​​​​​指​​​​​​​定​​​​​​​備​​​​​​​援​​​​​​​順​​​​​​​序​​​​​​​,那​​​​​​​麼​​​​​​​服​​​​​​​務​​​​​​​就​​​​​​​會​​​​​​​備​​​​​​​援​​​​​​​到​​​​​​​叢​​​​​​​集​​​​​​​中​​​​​​​的​​​​​​​任​​​​​​​何​​​​​​​一​​​​​​​個​​​​​​​節​​​​​​​點​​​​​​​上​​​​​​​。​​​​​​​同​​​​​​​時​​​​​​​,您​​​​​​​可​​​​​​​以​​​​​​​指​​​​​​​定​​​​​​​備​​​​​​​援​​​​​​​服​​​​​​​務​​​​​​​只​​​​​​​能​​​​​​​在​​​​​​​限​​​​​​​定​​​​​​​的​​​​​​​、​​​​​​​相​​​​​​​關​​​​​​​的​​​​​​​備​​​​​​​援​​​​​​​區​​​​​​​域​​​​​​​上​​​​​​​執​​​​​​​行​​​​​​​。​​​​​​​(當​​​​​​​一​​​​​​​項​​​​​​​叢​​​​​​​集​​​​​​​服​​​​​​​務​​​​​​​與​​​​​​​非​​​​​​​受​​​​​​​限​​​​​​​的​​​​​​​備​​​​​​​援​​​​​​​區​​​​​​​域​​​​​​​相​​​​​​​關​​​​​​​連​​​​​​​時​​​​​​​,如​​​​​​​果​​​​​​​備​​​​​​​援​​​​​​​區​​​​​​​域​​​​​​​的​​​​​​​成​​​​​​​員​​​​​​​都​​​​​​​不​​​​​​​能​​​​​​​使​​​​​​​用​​​​​​​,那​​​​​​​麼​​​​​​​該​​​​​​​服​​​​​​​務​​​​​​​會​​​​​​​在​​​​​​​任​​​​​​​何​​​​​​​節​​​​​​​點​​​​​​​上​​​​​​​執​​​​​​​行​​​​​​​。​​​​​​​)
In 圖形 1.9, “備​​​​​​​援​​​​​​​區​​​​​​​域​​​​​​​”, Failover Domain 1 is configured to restrict failover within that domain; therefore, Cluster Service X can only fail over between Node A and Node B. Failover Domain 2 is also configured to restrict failover with its domain; additionally, it is configured for failover priority. Failover Domain 2 priority is configured with Node C as priority 1, Node B as priority 2, and Node D as priority 3. If Node C fails, Cluster Service Y fails over to Node B next. If it cannot fail over to Node B, it tries failing over to Node D. Failover Domain 3 is configured with no priority and no restrictions. If the node that Cluster Service Z is running on fails, Cluster Service Z tries failing over to one of the nodes in Failover Domain 3. However, if none of those nodes is available, Cluster Service Z can fail over to any node in the cluster.
備​​​​​​​援​​​​​​​區​​​​​​​域​​​​​​​

圖形 1.9. 備​​​​​​​援​​​​​​​區​​​​​​​域​​​​​​​

圖形 1.10, “Web Server Cluster Service Example” shows an example of a high-availability cluster service that is a web server named "content-webserver". It is running in cluster node B and is in a failover domain that consists of nodes A, B, and D. In addition, the failover domain is configured with a failover priority to fail over to node D before node A and to restrict failover to nodes only in that failover domain. The cluster service comprises these cluster resources:
  • IP 位​​​​​​​址​​​​​​​來​​​​​​​源​​​​​​​ — IP 位​​​​​​​址​​​​​​​ 10.10.10.201。​​​​​​​
  • An application resource named "httpd-content" — a web server application init script /etc/init.d/httpd (specifying httpd).
  • A file system resource — Red Hat GFS named "gfs-content-webserver".
Web Server Cluster Service Example

圖形 1.10. Web Server Cluster Service Example

用​​​​​​​戶​​​​​​​端​​​​​​​透​​​​​​​過​​​​​​​ IP 位​​​​​​​址​​​​​​​ 10.10.10.201 連​​​​​​​上​​​​​​​叢​​​​​​​集​​​​​​​服​​​​​​​務​​​​​​​,與​​​​​​​網​​​​​​​站​​​​​​​伺​​​​​​​服​​​​​​​器​​​​​​​的​​​​​​​應​​​​​​​用​​​​​​​程​​​​​​​式​​​​​​​ httpd-content 互​​​​​​​動​​​​​​​。​​​​​​​httpd-content 應​​​​​​​用​​​​​​​程​​​​​​​式​​​​​​​會​​​​​​​使​​​​​​​用​​​​​​​ gfs-content-webserver 檔​​​​​​​案​​​​​​​系​​​​​​​統​​​​​​​。​​​​​​​如​​​​​​​果​​​​​​​節​​​​​​​點​​​​​​​ B 失​​​​​​​效​​​​​​​,content-webserver 叢​​​​​​​集​​​​​​​服​​​​​​​務​​​​​​​就​​​​​​​會​​​​​​​被​​​​​​​備​​​​​​​援​​​​​​​到​​​​​​​節​​​​​​​點​​​​​​​ D 上​​​​​​​面​​​​​​​去​​​​​​​。​​​​​​​如​​​​​​​果​​​​​​​節​​​​​​​點​​​​​​​ D 無​​​​​​​法​​​​​​​使​​​​​​​用​​​​​​​或​​​​​​​失​​​​​​​效​​​​​​​,這​​​​​​​項​​​​​​​服​​​​​​​務​​​​​​​就​​​​​​​會​​​​​​​被​​​​​​​備​​​​​​​援​​​​​​​到​​​​​​​節​​​​​​​點​​​​​​​ A。​​​​​​​對​​​​​​​叢​​​​​​​集​​​​​​​的​​​​​​​用​​​​​​​戶​​​​​​​端​​​​​​​來​​​​​​​說​​​​​​​,備​​​​​​​援​​​​​​​過​​​​​​​程​​​​​​​並​​​​​​​沒​​​​​​​有​​​​​​​帶​​​​​​​來​​​​​​​明​​​​​​​顯​​​​​​​的​​​​​​​服​​​​​​​務​​​​​​​中​​​​​​​斷​​​​​​​。​​​​​​​另​​​​​​​一​​​​​​​個​​​​​​​叢​​​​​​​集​​​​​​​節​​​​​​​點​​​​​​​會​​​​​​​透​​​​​​​過​​​​​​​同​​​​​​​樣​​​​​​​的​​​​​​​ IP 位​​​​​​​址​​​​​​​來​​​​​​​存​​​​​​​取​​​​​​​叢​​​​​​​集​​​​​​​服​​​​​​​務​​​​​​​,一​​​​​​​如​​​​​​​備​​​​​​​援​​​​​​​之​​​​​​​前​​​​​​​。​​​​​​​