转载自:
发现由于启动顺序错误(通过snapshot恢复功能)。好像造成mysql服务器用的drbd设备的脑裂。
在选定的非主节点上执行
drbdadm secondary mysql
drbdadm -- --discard-my-data connect mysql
主节点上执行
drbdadm connect mysql
总是不成功
发现两台机器确实进行过连接,但是不能正确的决定关系。
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Handshake successful: Agreed network protocol version 101
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Agreed to support TRIM on protocol level
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: conn( WFConnection -> WFReportParams )
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Starting asender thread (from drbd_r_mysql [30139])
Mar 26 09:58:42 hacontroller2 kernel: block drbd0: drbd_sync_handshake:
Mar 26 09:58:42 hacontroller2 kernel: block drbd0: self 5C25C478F3ACE6BE:28E2D98C86D01F89:076A48FD642993B9:076948FD642993B9 bits:75 flags:0
Mar 26 09:58:42 hacontroller2 kernel: block drbd0: peer C596BFE91962551F:076948FD642993B8 F5C06A38B650A2D4:F5BF6A38B650A2D5 bits:4985 flags:0
Mar 26 09:58:42 hacontroller2 kernel: block drbd0: uuid_compare()=-1000 by rule 100 Mar 26 09:58:42 hacontroller2 kernel: block drbd0: Unrelated data, aborting!
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: conn( WFReportParams -> Disconnecting )
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: error receiving ReportState, e: -5 l: 0!
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: asender terminated
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Terminating drbd_a_mysql
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Connection closed
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: conn( Disconnecting -> StandAlone )
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: receiver terminated
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Terminating drbd_r_mysql