Show Table of Contents
第1章 Pacemaker を使用した Red Hat High Availability クラスターの作成
本章では、
pcs コマンドを使用して 2 ノードの Red Hat High Availability クラスターを作成する手順を説明します。クラスターの作成後、必要なリソースやリソースグループを設定できます。
本章で説明しているクラスターを設定する場合には次のコンポーネントが必要になります。
- 2 ノード、クラスターを構成させるノードです。ここでは
z1.example.comとz2.example.comという名前にしています。 - プライベートネットワーク用のネットワークスイッチ、クラスター同士の通信およびネットワーク電源スイッチやファイバーチャンネルスイッチなどのクラスターハードウェアとの通信に必要になります。
- 各ノード用の電源フェンスデバイス、ここでは APC 電源スイッチの 2 ポートを使用しています。ホスト名は
zapc.example.comにしています。
本章は 3 つの項に分かれています。
- 「クラスターソフトウェアのインストール」 では、クラスターソフトウェアのインストール手順を説明します。
- 「クラスターの作成」 では、2 ノードクラスターの設定手順を説明します。
- 「排他処理の設定」 では、クラスターの各ノードにフェンスデバイスを設定する手順を説明します。
1.1. クラスターソフトウェアのインストール
クラスターのインストールおよび設定手順を以下に示します。
- クラスターの各ノードに、Red Hat High Availability Add-On ソフトウェアパッケージと使用可能なすべてのフェンスエージェントを High Availability チャンネルからインストールします。
#
yum install pcs pacemaker fence-agents-all firewalldデーモンを実行している場合は、以下のコマンドを実行して Red Hat High Availability Add-On が必要とするポートを有効にします。注記
firewalldデーモンがシステムにインストールされているかどうかを確認するには、rpm -q firewalldコマンドを実行します。firewalldデーモンがインストールされている場合は、firewall-cmd --stateコマンドを使用して実行されているかどうかを確認できます。#
firewall-cmd --permanent --add-service=high-availability#firewall-cmd --add-service=high-availabilitypcsを使ってクラスターの設定やノード間の通信を行うため、pcsの管理アカウントとなるユーザー IDhaclusterのパスワードを各ノードに設定しなければなりません。ユーザーhaclusterのパスワードは各ノードで同じパスワードにすることを推奨しています。#
passwd haclusterChanging password for user hacluster. New password: Retype new password: passwd: all authentication tokens updated successfully.- クラスターを設定する前に、各ノードで起動時にブートするよう
pcsdデーモンが起動および有効化されている必要があります。このデーモンはpcsコマンドで動作し、クラスターのノード全体で設定を管理します。クラスターの各ノードで次のコマンドを実行しpcsdサービスを起動、またシステムの起動時にpcsdが有効になるよう設定します。#
systemctl start pcsd.service#systemctl enable pcsd.service pcsを実行するノードでクラスター内の各ノードのpcsユーザーhaclusterを認証します。次のコマンドでは、z1.example.comとz2.example.comの 2 ノードで構成されるクラスターの両ノードに対してユーザーhaclusterの認証をz1.example.com上で行っています。[root@z1 ~]#
pcs cluster auth z1.example.com z2.example.comUsername:haclusterPassword: z1.example.com: Authorized z2.example.com: Authorized

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.