首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在PostgreSQL 7上使用Corosync/Pac怪机启动CentOS复制资源

无法在PostgreSQL 7上使用Corosync/Pac怪机启动CentOS复制资源
EN

Server Fault用户
提问于 2017-02-08 05:27:46
回答 1查看 2.4K关注 0票数 0

我有两个VM节点集群。Postgres是在主从复制模式下正常测试的。

当将pgsql添加为pc资源时,它会给出错误: From log文件。

代码语言:javascript
复制
care1 pgsql(pgsql)[30160]: ERROR: Replication(rep_mode=async or sync) requires Master/Slave configuration.

我已执行的命令:

代码语言:javascript
复制
pcs property set no-quorum-policy="ignore"
pcs property set stonith-enabled="false"
pcs resource defaults resource-stickiness="INFINITY"
pcs resource defaults migration-threshold="1"

pcs resource create vip-master IPaddr2 \
   ip="192.168.1.59" nic="enp0s3" \
   cidr_netmask="24" \
   op start   timeout="60s" interval="0s"  on-fail="restart" \
   op monitor timeout="60s" interval="10s" on-fail="restart" \
   op stop    timeout="60s" interval="0s"  on-fail="block"

pcs resource create rpgsql pgsql \
   pgctl="/usr/pgsql-9.5/bin/pg_ctl" \
   psql="/usr/pgsql-9.5/bin/psql" \
   pgdata="/var/lib/pgsql/9.5/data/" \
   rep_mode="sync" \
   node_list="care2 care1" \
   restore_command="cp /var/lib/pgsql/archive/%f %p" \
   primary_conninfo_opt="keepalives_idle=60 keepalives_interval=5 keepalives_count=5" \
   master_ip="192.168.1.59" \
   restart_on_promote="false" \
   op start   timeout="60s" interval="0s"  on-fail="restart" \
   op monitor timeout="60s" interval="4s" on-fail="restart" \
   op monitor timeout="60s" interval="3s"  on-fail="restart" role="Master" \
   op promote timeout="60s" interval="0s"  on-fail="restart" \
   op demote  timeout="60s" interval="0s"  on-fail="stop" \
   op stop    timeout="60s" interval="0s"  on-fail="block" \
   op notify  timeout="60s" interval="0s"

pcs status

[root@care1 data]# pcs status
Cluster name: pcs_cluster
Stack: corosync
Current DC: care1 (version 1.1.15-11.el7_3.2-e174ec8) - partition with quorum
Last updated: Wed Feb  8 10:21:04 2017      Last change: Wed Feb  8 10:08:25 2017 by root via cibadmin on care1

2 nodes and 3 resources configured: 1 resource DISABLED and 0 BLOCKED from being started due to failures

Online: [ care1 care2 ]

Full list of resources:

 WebServer  (ocf::heartbeat:apache):    Stopped (disabled)
 vip-master (ocf::heartbeat:IPaddr2):   Started care1
 pgsql  (ocf::heartbeat:pgsql): Stopped

Failed Actions:
* pgsql_start_0 on care2 'not configured' (6): call=62, status=complete, exitreason='Replication(rep_mode=async or sync) requires Master/Slave configuration.',
    last-rc-change='Wed Feb  8 10:08:26 2017', queued=0ms, exec=146ms


Daemon Status:
  corosync: active/disabled
  pacemaker: active/disabled
  pcsd: active/enabled

如果我做错了什么,请提出建议。

EN

回答 1

Server Fault用户

发布于 2017-02-08 17:51:37

在错误范围内,问题相当明显:

代码语言:javascript
复制
ERROR: Replication(rep_mode=async or sync) requires Master/Slave configuration.

您将需要为rpgsql原语配置MS (Master/Slave)类型的资源。请参阅文档中的第二个示例,将其应用于已经创建的资源。https://access.redhat.com/documentation/en-US/Red_帽子_企业_Linux/6/html/配置_这个_红色_帽子_高_可用性_加法_使用_起搏器/S1-多状态源-HAAR.html

为了方便起见,这里粘贴了示例:

代码语言:javascript
复制
pcs resource master master/slave_name resource_id|group_name [master_options]
票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/831242

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档