第5章 Pacemaker クラスターの設定


5.1. 基本的なクラスター設定のデプロイ

次の基本的なクラスターセットアップでは、SAP HANA システムレプリケーションを管理するための Pacemaker クラスターセットアップを開始するための最小限の手順を説明します。

複雑な構成の設定とオプションの詳細は、複数のリンクを持つ高可用性クラスターを作成する など、RHEL HA Add-On のドキュメントを参照してください。

前提条件

  • HANA システムレプリケーション環境をセットアップし、正しく動作していることを確認している。
  • このクラスターのノードとなるすべてのシステムで RHEL High Availability リポジトリーを設定している。
  • 計画した環境に応じて、フェンシングとクォーラムの要件を確認している。詳細は、HA クラスターの要件 を参照してください。

手順

  1. High Availability リポジトリーから Red Hat High Availability Add-On ソフトウェアパッケージをインストールします。インストールするフェンスエージェントを選択し、すべてのクラスターノードでインストールを実行します。

    1. 以下のように、クラスターパッケージとすべてのフェンスエージェントをインストールします。あるいは、

      [root]# dnf install pcs pacemaker fence-agents-all
    2. 以下のように、環境に応じてクラスターパッケージと特定のフェンスエージェントのみをインストールします。

      [root]# dnf install pcs pacemaker fence-agents-<model>
  2. すべてのクラスターノードで pcsd サービスを起動して有効にします。

    [root]# systemctl enable --now pcsd.service
  3. オプション: firewalld サービスを実行している場合は、Red Hat High Availability Add-On に必要なポートを有効にします。すべてのクラスターノードでこれを実行します。

    [root]# firewall-cmd --add-service=high-availability
    [root]# firewall-cmd --runtime-to-permanent
  4. ユーザー hacluster のパスワードを設定します。同じパスワードを使用して各ノードでコマンドを繰り返します。

    [root]# passwd hacluster
  5. クラスター内の各ノードに対してユーザー hacluster を認証します。最初のノードでこれを実行します。

    [root]# pcs host auth <node1> <node2>
    Username: hacluster
    Password:
    <node1>: Authorized
    <node2>: Authorized
    • /etc/hosts ファイルで定義されているように、FQDN の有無にかかわらずノード名を入力します。
    • プロンプトに hacluster ユーザーのパスワードを入力します。
  6. 名前を指定してクラスターを作成し、クラスターメンバーの名前 (例: node1 および node2) を完全修飾ホスト名で指定します。これにより、両方のノードにクラスター設定が伝播され、クラスターが起動します。最初のノードでこのコマンドを実行します。

    [root]# pcs cluster setup <cluster_name> --start <node1> <node2>
    No addresses specified for host 'node1', using 'node1'
    No addresses specified for host 'node2', using 'node2'
    Destroying cluster on hosts: 'node1', 'node2'...
    node2: Successfully destroyed cluster
    node1: Successfully destroyed cluster
    Requesting remove 'pcsd settings' from 'node1', 'node2'
    node1: successful removal of the file 'pcsd settings'
    node2: successful removal of the file 'pcsd settings'
    Sending 'corosync authkey', 'pacemaker authkey' to 'node1', 'node2'
    node1: successful distribution of the file 'corosync authkey'
    node1: successful distribution of the file 'pacemaker authkey'
    node2: successful distribution of the file 'corosync authkey'
    node2: successful distribution of the file 'pacemaker authkey'
    Sending 'corosync.conf' to 'node1', 'node2'
    node1: successful distribution of the file 'corosync.conf'
    node2: successful distribution of the file 'corosync.conf'
    Cluster has been successfully set up.
    Starting cluster on hosts: 'node1', 'node2'...
  7. システムの起動時にクラスターが自動的に起動されるようにします。これにより、corosync および pacemaker サービスが有効になります。ノードの再起動後にクラスターの起動を手動で制御する場合は、このステップをスキップしてください。1 つのノードで実行:

    [root]# pcs cluster enable --all
    node1: Cluster Enabled
    node2: Cluster Enabled

検証

  • クラスターのステータスを確認します。クラスターデーモンサービスが目的の状態にあることを確認します。

    [root]# pcs status --full
    Cluster name: node1-node2-cluster
    
    WARNINGS:
    No stonith devices and stonith-enabled is not false
    
    Cluster Status:
     Cluster Summary:
       * Stack: corosync (Pacemaker is running)
       * Current DC: node1 (version ) - partition with quorum * Last updated: * on node1 * Last change: ** by hacluster via hacluster on node1
       * 2 nodes configured
       * 0 resource instances configured
    
    ...
    
    PCSD Status:
      node1: Online
      node2: Online
    
    Daemon Status:
      corosync: active/enabled
      pacemaker: active/enabled
      pcsd: active/enabled

次のステップ

Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2026 Red Hat
トップに戻る