論理ホストは、ノードが故障した場合にフェイルオーバーを行うオブジェクトです。各論理ホストは、1 つ以上のディスクグループ、再割り当てが可能な IP アドレス、論理ホスト名から構成されます。論理ホストが使用されるのは、HA データサービスによる構成の場合だけです。パラレルデータベース構成には論理ホストは存在しません。
論理ホストを追加または削除するには、クラスタに格納されている論理ホストの構成情報を更新してから、クラスタを再構成します。クラスタの最初の構成では、scinstall(1M) に論理ホスト構成の情報を指定します。クラスタが起動した後、この情報は次の 2 つの方法で変更できます。
scinstall(1M) コマンドを再実行する - scinstall(1M) コマンドは、scconf(1M) コマンドにメニューベースのインタフェースを提供します。論理ホスト構成の変更にはこの方法をお勧めします。scinstall(1M) は、root として実行する必要があります。
scconf(1M) コマンドを実行する - scconf(1M) コマンドを使用する場合は、オプションなどの詳細をマニュアルページで参照してください。複数のディスクグループを使用する論理ホストを設定する場合は、scconf(1M) コマンドを使用してこの構成を行う必要があります。
論理ホストを追加する作業の一部として、次の情報を指定する必要があります。
クラスタノードの主パブリックネットワークコントローラの名前
クラスタが二次パブリックサブネットに対してサービスを行うかどうか
現在のクラスタノードで Public Network Management (PNM) を初期化するかどうか。ネットワークコントローラを追加した場合と、新しい論理ホストを追加してコントローラ構成を変更した場合を除いて、PNM を初期化し直す必要はありません。
新しい論理ホストの名前
新しい論理ホストのデフォルトマスターの名前
論理ホストに含まれるディスクグループの名前
新しい論理ホストで自動フェイルバックを有効にするかどうか。自動フェイルバックは、この論理ホストがバックアップノードに対してフェイルオーバーを行う状況が発生した場合、障害が発生したノードがクラスタに戻された時点で、この論理ホストがデフォルトマスターによって再度制御されることを意味します。詳細は、「自動スイッチオーバーの無効化」を参照してください。
新しい論理ホストのディスクグループ名
作業を開始する前に、これらの事項について確認、決定を行なってください。新しい論理ホストが使用するディスクグループは、あらかじめ設定しておく必要があります。詳細は、『Sun Cluster 2.2 ソフトウェアのインストール』のボリュームマネージャについて説明している付録を参照してください。
クラスタに論理ホストを追加するには、次の作業を行います。
scinstall(1M) コマンドを実行し、「Main Menu」から「Change」を選択します。
# scinstall Assuming a default cluster name of planets Note: Cluster planets is currently running. Install/Uninstall actions are disabled during cluster operation. <<Press return to continue>> Checking on installed package state ........................ ============ Main Menu ================= 1) Change - Modify cluster or data service configuration. 2) Verify - Verify installed package sets. 3) List - List installed package sets. 4) Quit - Quit this program. 5) Help - The help screen for this menu. Please choose one of the menu items: [5]: 1 |
「Change」メニューから「Logical Hosts」を選択します。
=========== Changes Menu ================ Choices from this menu: 1) Logical Hosts - Change the logical hosts configuration. 2) NAFO - Re-initialize the NAFO configuration. 3) Close - Close this menu to return to the Main Menu. 4) Quit - Exit this program. 5) Help - Show the Help screen. Please choose a displayed option: [5] 1 |
「Logical Hosts Configuration」メニューが表示されます。
「Logical Hosts Configuration」メニューから、「Add」を選択します。
====== Logical Hosts Configuration ====== 1) Add - Add a logical host to the cluster. 2) Remove - Remove a logical host from the cluster. 3) List - List the logical hosts in the cluster. 4) Close - Return to the previous menu. 5) Quit - Exit. Please choose an option: 1 |
新しい論理ホストについて、多数の質問が表示されます。
質問ごとに、必要な情報を応答します。
この作業の scinstall(1M) の部分が終わると、「Logical Hosts Configuration」メニューに戻ります。
What is the primary public network controller for "phys-hahost1"? What is the primary public network controller for "phys-hahost2"? Does the cluster serve any secondary public subnets (yes/no) [no]? Re-initialize NAFO on "phys-hahost1" with one ctlr per group (yes/no)? What is the name of the new logical host? hahost1 What is the name of the default master for "hahost1"? phys-hahost1 Enable automatic failback for "hahost1" (yes/no) [no]? Disk group name for logical host "hahost1" [hahost1]? Is it okay to add logical host "hahost1" now (yes/no) [yes]? /etc/opt/SUNWcluster/conf/ha.cdb Checking node status... |
新しい HA 管理ファイルシステムを作成し、/etc/opt/SUNWcluster/conf/hanfs/vfstab.logicalhost ファイルを更新します。
新しい論理ホストを追加する場合、管理情報を格納するために論理ホスト内のディスクグループにファイルシステムを設定する必要があります。HA 管理ファイルシステムの設定手順は、使用しているボリュームマネージャによって異なります。これらの手順については、『Sun Cluster 2.2 ソフトウェアのインストール』のボリュームマネージャに関する付録で説明しています。
論理ホストにはホスト名の別名を使用しないでください。論理ホスト名の別名を使用する Sun Cluster ファイルシステムをマウントする NFS クライアントで、statd のロック回復問題が発生する可能性があります。
クラスタ構成から論理ホストを削除するには、クラスタが動作しており、その論理ホストにデータサービスが登録されていない状態でなければなりません。
削除する論理ホスト上で動作しているデータサービスアプリケーションをすべて停止します。
# hareg -n detaservice |
そのデータサービスの登録を解除します。
# hareg -u detaservice |
クラスタから論理ホストを削除します。
『Sun Cluster 2.2 ソフトウェアのインストール』の説明に従って scinstall(1M) コマンドを実行し、「Main Menu」から「Change」を選択します。
# scinstall Assuming a default cluster name of planets Note: Cluster planets is currently running. Install/Uninstall actions are disabled during cluster operation. <<Press return to continue>> Checking on installed package state ........................ ============ Main Menu ================= 1) Change - Modify cluster or data service configuration. 2) Verify - Verify installed package sets. 3) List - List installed package sets. 4) Quit - Quit this program. 5) Help - The help screen for this menu. Please choose one of the menu items: [5]: 1 |
「Change」メニューから、「Logical Hosts」を選択します。
=========== Changes Menu ================ Choices from this menu: 1) Logical Hosts - Change the logical hosts configuration. 2) NAFO - Re-initialize the NAFO configuration. 3) Close - Close this menu to return to the Main Menu. 4) Quit - Exit this program. 5) Help - Show the Help screen. Please choose a displayed option: [5] 1 |
「Logical Hosts Configuration」メニューが表示されます。
「Logical Hosts Configuration」メニューから、「Remove」を選択します
====== Logical Hosts Configuration ====== 1) Add - Add a logical host to the cluster. 2) Remove - Remove a logical host from the cluster. 3) List - List the logical hosts in the cluster. 4) Close - Return to the previous menu. 5) Quit - Exit. Please choose an option: 2 |
構成済みの論理ホストが表示されます。
構成済み論理ホストのリストから削除する論理ホストの名前を入力します。
The list of logical hosts is: hahost1 hahost2 Which one do you want to remove? hahost1 |
以上で作業が終了し、「Logical Hosts Configuration」メニューに戻ります。
クラスタ構成にその論理ホストが追加された時に作成された /etc/opt/SUNWcluster/conf/hanfs/vfstab.logicalhost ファイルを、root として削除します。