ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 一个比较靠谱的 pacemaker 配置 ms 模式 pg 数据库

一个比较靠谱的 pacemaker 配置 ms 模式 pg 数据库

原创 Linux操作系统 作者:babyyellow 时间:2014-01-26 17:03:12 0 删除 编辑
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"

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/133735/viewspace-1075657/,如需转载,请注明出处,否则将追究法律责任。

下一篇: ip 命令的说明
请登录后发表评论 登录
全部评论
oracle MySQL Postgresql 专职数据库dba。 系统架构师。 mysql 官方认知dba 。 15年专职dba 经验。

注册时间:2010-12-02

  • 博文量
    248
  • 访问量
    1471804