Cluster Management Shell
GitHub crmsh
H/A構成を作成するPacemaker+Corosyncの、EIP設定shellコマンド。
pcsと比べると設定出来る項目が多く、参考資料も多岐にわたる。
pcsの完成度が上がるまではcrmshを使う方が良い。
1. ビルドインストール
crmshにはPythonからxmlを弄る為のライブラリが必要になる。
また、ビルドする際にはsysconfdirとlocalstatedirをCorosync/Pacemakerと合わせる必要がある。
# yum install python-lxml # git clone https://github.com/crmsh/crmsh crmsh # cd crmsh # ./autogen.sh # ./configure --sysconfdir=/etc --localstatedir=/var # make # make install
Peer to Peerクラスタリング
一番簡単で基本的な冗長構成。
一般的には2NICを使用するインターリンク構成を取るが、下記では1NIC(共有NIC)で冗長構成を作る。
ルール名:LoadBalancer_001 仮想IP:192.168.0.10/24 NIC:eth0 ===== # crm crm(live)# configure crm(live)configure# primitive LoadBalancer_001 ocf:heartbeat:IPaddr2 params ip="192.168.0.10" cidr_netmask="24" nic="eth0" crm(live)configure# property no-quorum-policy="ignore" stonith-enabled="false" crm(live)configure# node Node1 crm(live)configure# node Node2 crm(live)configure# commit crm(live)configure# exit