Show Table of Contents
1.2. 建立叢集
此程序會建立一個包含
z1.example.com 與 z2.example.com 節點的 Red Hat High Availability Add-On 叢集。
- 由
z1.example.com執行下列指令以建立包含了z1.example.com與z2.example.com節點的雙節點叢集my_cluster。這會將叢集配置檔案散佈到叢集中的兩個節點上。這項指令包含了--start選項,這會在叢集中的兩個節點上啟用叢集服務。[root@z1 ~]#
pcs cluster setup --start --name my_cluster\z1.example.com z2.example.comz1.example.com: Succeeded z1.example.com: Starting Cluster... z2.example.com: Succeeded z2.example.com: Starting Cluster... - 啟用叢集服務以使其在節點啟動時,在叢集中的各個節點上運作。
注意
您可選擇藉由跳過此步驟,以使您特定環境中的叢集服務保持停用。這能讓您確保在節點停機時,所有您叢集或資源上的問題,都能在節點重新加入叢集之前解決。若您將叢集服務保留為停用,當您重新啟動一個節點時,您將需要在該節點上透過執行pcs cluster start指令來手動式啟用服務。#
pcs cluster enable --all
您可透過
pcs cluster status 指令來顯示叢集的目前狀態。由於在使用 pcs cluster setup 指令的 --start 選項啟動叢集服務時,會有些許延遲,所以在對叢集執行任何後續動作、進行配置之前,請確定叢集已經啟用並處於執行狀態。
[root@z1 ~]# pcs cluster status
Cluster Status:
Last updated: Thu Jul 25 13:01:26 2013
Last change: Thu Jul 25 13:04:45 2013 via crmd on z2.example.com
Stack: corosync
Current DC: z2.example.com (2) - partition with quorum
Version: 1.1.10-5.el7-9abe687
2 Nodes configured
0 Resources configured
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.