找回密码
 注册
查看: 4121|回复: 4

高可用pacemaker状态,db状态为stopped

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2017-12-28 18:27:53 | 显示全部楼层 |阅读模式
# pcs status
: G; |1 s3 W5 T0 T! xCluster name: my_wsrep_cluster+ G. f& I, @' q+ G
Stack: corosync3 |  M- Q1 l8 M! s- @( Z- A- R
Current DC: controller1 (version 1.1.16-12.el7_4.5-94ff4df) - partition with quorum* L$ g) X, }5 r# o: o% E- |% W
Last updated: Thu Dec 28 18:24:33 2017& |' T. _3 e0 F# |9 C1 D$ u2 F
Last change: Thu Dec 28 18:05:11 2017 by root via cibadmin on controller1
" O; g6 E8 M$ S  j% o, p5 C3 nodes configured+ M3 _6 y- d8 `" K0 B! F$ G: i
1 resource configured
9 I. T. I- C) }2 y) \7 V, UOnline: [ controller1 controller2 controller3 ]# I% u- L* ^: W3 U; D2 N& I, s
Full list of resources:
9 O- d/ V6 r0 j* s9 ]) i( M; U' Q db (ocf::heartbeat:galera): Stopped
& d6 u& V* [9 B% A& c% _Failed Actions:" h0 X& A" j4 s" E/ p8 ^' @) [
* db_start_0 on controller1 'not configured' (6): call=22, status=complete, exitreason='Galera must be configured as a multistate Master/Slave resource.',
8 ?3 `2 d7 J# v( s    last-rc-change='Thu Dec 28 18:05:11 2017', queued=1ms, exec=56ms
8 N8 M0 C9 Y7 B% |' }
  \: `4 _: R7 R( F% kDaemon Status:! |: r. \# o. y' N
  corosync: active/enabled
8 m4 h9 d- `+ {, E  pacemaker: active/enabled
( n& }3 q7 T0 R  pcsd: active/enabled
% ~, X5 ~" S" F0 o, F/ a# e
0 r, E$ p3 x5 o0 e所有的状态都是active的,唯独只有db状态是stopped,为什么呢?+ k9 g( V! W# s4 E) x1 l7 I

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2017-12-28 19:35:10 | 显示全部楼层
才疏学浅,未能解决问题,遗憾。不知哪儿出问题了,好尴尬。

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2017-12-28 19:36:13 | 显示全部楼层
配置一个mariadb服务9 e" T% R& ^) z8 E' z6 g
在所有节点上执行9 U4 N& M8 X0 G
# yum install mariadb-* -y
5 [) f: }3 x( q/ m7 y6 W2 I# systemctl disable mariadb" Y1 O' C% J- z- I$ @; y
# systemctl status mariadb5 }( E8 D, e4 V! Y
# pcs create resource DB ocf:heartbear:mysql% W: f9 J; X! ?, f6 ~0 H
配置一个互为备份的双机环境,一个节点作为web,一个节点作为db,各自有自己的浮动IP,出现故障的时候互相切换
  h! m) V, i4 ~7 [# pcs resource create VIP1 ocf:heartbeat:IPaddr2 ip=192.168.122.171 cidr_netmask=24 nic=eth0
4 a; S9 r% T4 M& J. Y# pcs resource group add MyGroup1 VIP1 DB(因为前面已经把DB添加到MyGroup组,所以需要先用pcs resource disable WEB; pcs resource diable DB;pcs resource group remove MyGroup DB; pcs resource enable WEB;才可以添加DB到MyGroup1 ): R8 }8 Y7 G( ?3 X. [
# pcs constraint location add server1 DB node1 1
4 g. l: R% _7 h4 \# pcs constraint location add server1 VIP1 node1 1
" [$ e, s9 `2 B7 ?) @5 S7 \" ^- ?1 `# pcs constraint location add server2 FS node2 12 u/ Q1 ?0 G3 c0 L& `/ `
# pcs constraint location add server2 VIP node2 17 [3 y& M0 R3 e' @, W7 q/ s
# pcs constraint location add server2 WEB node2 1
4 K6 ]6 W2 ^* C" Z+ Q执行上述命令后,DB和VIP1将启动在node1上而剩下的FS VIP WEB将启动在node2上

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2017-12-28 20:30:01 | 显示全部楼层
突然想起来好像用的是pike版本的源,这个版本有可能有问题。还需要验证,想着回退到octa版本,试试。

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2017-12-28 23:05:06 | 显示全部楼层
controller_start_0 on controller1 'unknown error'
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 04:21 , Processed in 0.015740 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表