易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 4584|回复: 3
收起左侧

pacemaker的服务都正常,但是报'unknown error

[复制链接]
发表于 2017-12-28 23:21:27 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
Failed Actions:
0 E5 W+ k3 e- P# `4 M4 q; }! o" y+ n* controller_start_0 on controller1 'unknown error' (1): call=7, status=complete, exitreason='Unable to detect last* L$ u% u; V' Z# b1 L& f7 b; @# [
known write sequence number',/ d0 ^* Z+ c5 O( J4 B; m: ^, j
    last-rc-change='Thu Dec 28 23:17:22 2017', queued=0ms, exec=7076ms
  m1 O0 Q5 p1 i8 K
发表于 2017-12-29 10:30:47 | 显示全部楼层
谁遇到过此类问题。
 楼主| 发表于 2017-12-29 10:40:48 | 显示全部楼层
安装ha组件:
) j, x) ~  c( ]9 o+ w, W: `/ c; vyum install pcs fence-agents-all. J& W6 v4 S. X/ k4 U

  M0 T- i( H! m8 k- N  J4 {6 e创建集群
* b. v$ }' _5 tpcs cluster setup --start --name my_cluster z1.example.com z2.example.com1 {" ^" ]1 n2 h0 f2 \) R; S
启动集群服务6 l; m" m* A. i9 l6 K+ v# C
pcs cluster enable --all
7 s# ^6 g& {, C查看集群状态
. p& O+ z2 q0 w( Upcs cluster status
) Y3 h, k$ k% F% B& Z0 I! X& C7 `$ T# y8 q8 J9 n# P
创建stonith设备* r/ \( |9 d6 n/ I4 ]# h

& S1 U/ q2 O2 I. J/ l) gpcs stonith create myapc fence_apc_snmp params ipaddr="zapc.example.com" pcmk_host_map="z1.example.com:1;z2.example.com:2" pcmk_host_check= "static-list" pcmk_host_list="z1.example.com,z2.example.com" login="apc" passwd="apc" - O. f2 R0 g' \2 g% h) U) H
pcs stonith show myapc
# U0 c( ~! M$ i. P5 w) Y
; X8 m% y  M; v# P1 e" s" A4 f( e创建资源
4 ~$ O4 w% G% l/ {* z' Epcs resource create my_lvm LVM volgrpname=my_vg exclusive=true --group apachegroup5 i: X; P- Z/ F3 T% m
pcs resource show0 k: b5 H* ^. j. N0 r

" i. o  s8 k1 }3 A0 bpcs resource enable
: T3 S6 |/ a+ b4 `% p. W* {2 S3 c% Epcs resource create my_fs Filesystem device="/dev/my_vg/my_lv" directory="/var/www" fstype="ext4" --group apachegroup
" p' v7 C2 H7 U4 I3 a7 F1 w" tpcs resource create VirtualIP IPaddr2 ip=198.51.100.3 cidr_netmask=24 --group apachegroup
% T/ G0 j5 e7 K& y* T5 Rpcs resource create Website apache configfile="/etc/httpd/conf/httpd.conf" statusurl="http://127.0.0.1/server-status" --group apachegroup. i3 R% n) f* I6 a' Z
pcs resource create VirtualIP ocf:heartbeat:IPaddr2 ip=192.16 8.0.120 cidr_netmask=24 opmonitorinterval= 30s
0 @- b+ ~5 I  E8 h0 J$ c- o8 i, x. N( f6 E2 ^

# ^! Q- q' y0 ], ^3 o! A( }+ B查看集群状态:
4 i% I' }9 j* i9 `. gpcs status
. ?# C" G( {' M& E: ~7 P3 e9 t7 h倒换节点:pcs cluster standby z1.example.compcs cluster unstandby z1.example.com+ H. N9 l" t) x5 k! S" J
查看帮助pcs resource -h
# z! C+ ~4 W) Y$ P* d0 K( g导出和备份配置文件pcs cluster cib testfilepcs config backuppcs config restorepcs cluster setup --name new_cluster nodeA nodeB --token 10000 --join 100pcs cluster stoppcs cluster enablepcs cluster disablepcs cluster node add nodepcs cluster node remove nodepcs cluster standby nodepcs cluster unstandby nodepcs stonith listpcs stonith describepcs stonith show --fullpcs stonith create myapc-west-13 fence_apc pcmk_host_list="west-13" ipaddr="west-apc" login="apc" passwd="apc" port="15"
4 y: P' R) s9 g; Wfence对应节点:pcs stonith fence nodepcs resource delete VirtualIPpcs resource describe LVMpcs resource show --fullpcs resource enable resource_id! g. P# R: K- S/ E+ A8 u7 v
pcs resource disable resource_id
6 f0 C% c5 e; q- R5 ^$ _3 F3 k! w* h/ x; ^# \$ G9 _$ n
设置资源先后关系pcs constraint VirtualIP then dummy_resource kind=Optional1 N& ?4 ~8 ~6 A9 @% t" X
进入维护模式:pcs resource unmanage resource1, u3 m7 A/ X  o- g, H
解除维护模式
) v! p; k) s; Ipcs resource manage resource1
 楼主| 发表于 2018-1-13 15:24:40 | 显示全部楼层
Failed Actions:
' }; M3 w+ R1 a% y1 x* my_wsrep_cluster_promote_0 on controller1 'unknown error' (1): call=12, status=complete, exitreason='Failure, Atte
8 C" k! s% Z) j! W+ ympted to promote Master instance of my_wsrep_cluster before bootstrap node has been detected.',
0 D0 o0 |/ j. h    last-rc-change='Sat Jan 13 15:20:31 2018', queued=0ms, exec=94ms
) I, K( l* c! }7 @* my_wsrep_cluster_promote_0 on controller2 'unknown error' (1): call=12, status=complete, exitreason='Failure, Atte, t* w* e* w$ ~  m1 }; a: g
mpted to promote Master instance of my_wsrep_cluster before bootstrap node has been detected.',
: |3 R) W& B, ~    last-rc-change='Sat Jan 13 15:20:33 2018', queued=1ms, exec=102ms
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 点击这里给我发消息

GMT+8, 2026-4-8 15:26 , Processed in 0.039154 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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