一個比較靠譜的 pacemaker 配置 ms 模式 pg 資料庫
crm(live)# configure show
node node1 \
attributes pgsql-data-status="LATEST"
node node2 \
attributes pgsql-data-status="LATEST"
primitive clusterip ocf:heartbeat:IPaddr2 \
params ip="192.168.10.104" nic="eth0" cidr_netmask="22" \
op monitor interval="10s" timeout="30s" \
op start interval="0" timeout="30s" on-fail="restart" \
op stop interval="0" on-fail="fence" iimeout="30s" \
meta target-role="Started"
primitive fence_node1 stonith:fence_ipmilan \
params passwd="admin" ipaddr="10.10.25.22" login="admin" delay="300s" lanplus="true" action="reboot" pcmk_host_list="node1 node2" pcmk_monitor_action="status" pcmk_host_check="static-list" \
op start interval="0" timeout="60s" \
op stop interval="0" timeout="60s" \
op monitor interval="20s" \
meta target-role="Started"
primitive fence_node2 stonith:fence_ipmilan \
params passwd="admin" ipaddr="10.10.25.23" login="admin" lanplus="true" action="reboot" pcmk_host_list="node1 node2" pcmk_monitor_action="status" pcmk_host_check="static-list" \
op start interval="0" timeout="60s" \
op stop interval="0" timeout="60s" \
op monitor interval="20s" \
meta target-role="Started"
primitive pgsql ocf:heartbeat:pgsql \
params pgctl="/usr/local/pgsql/bin/pg_ctl" pgdba="postgres" psql="/usr/local/pgsql/bin/psql" pgdata="/usr/local/pgsql/data" pgport="5432" monitor_user="postgres" monitor_password="postgres" config="/usr/local/pgsql/data/postgresql.conf" rep_mode="async" node_list="192.168.10.102 192.168.10.91" master_ip="192.168.10.104" check_wal_receiver="true" xlog_check_count="10" restore_command="cp /usr/local/pgsql/archivelog/%f %p ||scp 192.168.10.104:/usr/local/pgsql/archivelog/%f %p " repuser="postgres" check_wal_receiver="true" restart_on_promote="true" \
op start interval="0" timeout="120s" on-fail="fence" \
op stop interval="0" timeout="120s" on-fail="fence" \
op promote interval="0" timeout="120s" on-fail="fence" \
op monitor interval="10s" timeout="30s" on-fail="restart" \
op monitor interval="13s" timeout="30s" role="Master"
primitive ping ocf:pacemaker:ping \
params name="ping" host_list="192.168.10.254" attempts="5" multiplier="1000" \
op monitor interval="10s" timeout="60s" \
op start interval="0" timeout="60s"
ms ms-pgsql pgsql \
meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"
clone cl-ping ping \
meta interleave="true" target-role="Started"
location loc-clusterip-on-ping clusterip \
rule $id="loc-clusterip-on-ping-rule" $role="Master" -inf: not_defined ping or ping number:lte 0
location loc-fence-node1 fence_node1 -inf: node1
location loc-fence-node2 fence_node2 -inf: node2
location loc-pgdb-master-on-ping ms-pgsql \
rule $id="loc-pgdb-master-on-ping-rule" $role="Master" -inf: not_defined ping or ping number:lte 0
colocation clusterip-stay-with-master inf: clusterip ms-pgsql:Master
order order-clusterip-after-pgdb inf: ms-pgsql:promote clusterip
property $id="cib-bootstrap-options" \
dc-version="1.1.10-14.el6_5.1-368c726" \
cluster-infrastructure="classic openais (with plugin)" \
expected-quorum-votes="2" \
stonith-enabled="true" \
last-lrm-refresh="1106499905" \
no-quorum-policy="ignore" \
default-resource-stickiness="100"
node node1 \
attributes pgsql-data-status="LATEST"
node node2 \
attributes pgsql-data-status="LATEST"
primitive clusterip ocf:heartbeat:IPaddr2 \
params ip="192.168.10.104" nic="eth0" cidr_netmask="22" \
op monitor interval="10s" timeout="30s" \
op start interval="0" timeout="30s" on-fail="restart" \
op stop interval="0" on-fail="fence" iimeout="30s" \
meta target-role="Started"
primitive fence_node1 stonith:fence_ipmilan \
params passwd="admin" ipaddr="10.10.25.22" login="admin" delay="300s" lanplus="true" action="reboot" pcmk_host_list="node1 node2" pcmk_monitor_action="status" pcmk_host_check="static-list" \
op start interval="0" timeout="60s" \
op stop interval="0" timeout="60s" \
op monitor interval="20s" \
meta target-role="Started"
primitive fence_node2 stonith:fence_ipmilan \
params passwd="admin" ipaddr="10.10.25.23" login="admin" lanplus="true" action="reboot" pcmk_host_list="node1 node2" pcmk_monitor_action="status" pcmk_host_check="static-list" \
op start interval="0" timeout="60s" \
op stop interval="0" timeout="60s" \
op monitor interval="20s" \
meta target-role="Started"
primitive pgsql ocf:heartbeat:pgsql \
params pgctl="/usr/local/pgsql/bin/pg_ctl" pgdba="postgres" psql="/usr/local/pgsql/bin/psql" pgdata="/usr/local/pgsql/data" pgport="5432" monitor_user="postgres" monitor_password="postgres" config="/usr/local/pgsql/data/postgresql.conf" rep_mode="async" node_list="192.168.10.102 192.168.10.91" master_ip="192.168.10.104" check_wal_receiver="true" xlog_check_count="10" restore_command="cp /usr/local/pgsql/archivelog/%f %p ||scp 192.168.10.104:/usr/local/pgsql/archivelog/%f %p " repuser="postgres" check_wal_receiver="true" restart_on_promote="true" \
op start interval="0" timeout="120s" on-fail="fence" \
op stop interval="0" timeout="120s" on-fail="fence" \
op promote interval="0" timeout="120s" on-fail="fence" \
op monitor interval="10s" timeout="30s" on-fail="restart" \
op monitor interval="13s" timeout="30s" role="Master"
primitive ping ocf:pacemaker:ping \
params name="ping" host_list="192.168.10.254" attempts="5" multiplier="1000" \
op monitor interval="10s" timeout="60s" \
op start interval="0" timeout="60s"
ms ms-pgsql pgsql \
meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"
clone cl-ping ping \
meta interleave="true" target-role="Started"
location loc-clusterip-on-ping clusterip \
rule $id="loc-clusterip-on-ping-rule" $role="Master" -inf: not_defined ping or ping number:lte 0
location loc-fence-node1 fence_node1 -inf: node1
location loc-fence-node2 fence_node2 -inf: node2
location loc-pgdb-master-on-ping ms-pgsql \
rule $id="loc-pgdb-master-on-ping-rule" $role="Master" -inf: not_defined ping or ping number:lte 0
colocation clusterip-stay-with-master inf: clusterip ms-pgsql:Master
order order-clusterip-after-pgdb inf: ms-pgsql:promote clusterip
property $id="cib-bootstrap-options" \
dc-version="1.1.10-14.el6_5.1-368c726" \
cluster-infrastructure="classic openais (with plugin)" \
expected-quorum-votes="2" \
stonith-enabled="true" \
last-lrm-refresh="1106499905" \
no-quorum-policy="ignore" \
default-resource-stickiness="100"
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/133735/viewspace-1075657/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 基於4個節點的corosync + pacemaker PG 資料庫 HA 配置ROS資料庫
- android 比較靠譜的圖片壓縮Android
- 可以買球賽的app 哪個app賭足球比較靠譜APP
- 靠譜的少兒程式設計網站比較好用?程式設計網站
- 比較兩個資料庫的差異資料庫
- 招聘一個靠譜的iOSiOS
- 資料庫資料安全保障方法就是使用靠譜的工具!資料庫
- Mysql pg oracle三種資料庫獲取月份、周的函式比較MySqlOracle資料庫函式
- 如何招一個靠譜的前端前端
- 競彩足球軟體app推薦 哪個APP賭足球比較靠譜APP
- 共享wifi專案哪個品牌比較靠譜?不入行的人很難分辨WiFi
- 圖資料庫比較資料庫
- 主流資料庫比較資料庫
- MySQL 一種比較經濟的資料庫MySql資料庫
- 資料化比大資料更靠譜大資料
- 如何比較兩個資料庫表結構的不同資料庫
- 如何對比多個庫,看看那個最靠譜
- oracle資料庫兩表資料比較Oracle資料庫
- java比較mysql兩個資料庫中差異JavaMySql資料庫
- 比較兩個資料庫的表結構差異(轉)資料庫
- 資料庫比較 PostgreSQL vs MongoDB資料庫SQLMongoDB
- 幾種常用資料庫比較資料庫
- 【PG資料庫】PG資料庫的安裝及連線方法資料庫
- MySQL大量資料入庫的效能比較MySql
- 關閉資料庫比較好的方法資料庫
- 比較兩個mysql資料庫裡面的表是否相同的一個校驗指令碼MySql資料庫指令碼
- 配置雲伺服器,如何選擇一個靠譜的雲服務商?伺服器
- 比較兩個表的資料差別
- 轉享:NoSQL 圖資料庫比較SQL資料庫
- 比較SQL資料庫和HadoopSQL資料庫Hadoop
- Oracle資料庫遷移方案比較Oracle資料庫
- 磁碟資料庫與記憶體資料庫的特點比較資料庫記憶體
- 比較兩個TABLE的資料是否完全一致
- influxdb與傳統資料庫的比較UX資料庫
- 模式:每個服務一個資料庫模式資料庫
- 一個比 Redis 效能更強的資料庫Redis資料庫
- 一篇不大靠譜的nginx 1.11.10配置檔案Nginx
- 一個字串比較的題字串