指定したノードをクラスタのmasterにする
以下3ノードがある。
- n1
- n2
- n3
pcsの場合
n1をMasterにする
pcs cluster standby n2
pcs cluster standby n3
pcs cluster unstandby --all
n2をMasterにする
pcs cluster standby n1
pcs cluster standby n3
pcs cluster unstandby --all
n3をMasterにする
pcs cluster standby n1
pcs cluster standby n2
pcs cluster unstandby --all
もしくは crm_resourceコマンドを使う
crmの場合
# /usr/sbin/crm node standby www-primary.local
cibadmin not available, check your installation
/usr/sbin/cibadminにPATHが通っていない場合上記エラーが出る。
# export PATH=$PATH:/usr/sbin:/sbin
# /usr/sbin/crm node standby www-primary.local
n1をMasterにする
crm node standby n2
crm node standby n3
crm node online n2
crm node online n3