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で構成される 2 ノードクラスターの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.