Drbd-problema no aconsegueixo el primary/secondary
drbroot@drbd0heartbeat:~# drbd-overview
0:r0/0 StandAlone Secondary/Unknown UpToDate/DUnknown
root@drbd1heartbeat:~# drbd-overview
0:r0/0 WFConnection Primary/Unknown UpToDate/DUnknown /var/lib/mysql ext4 32G 6.7G 24G 23%
Canvi ordre d’arrancada, reinicio només un d'ells
root@drbd0heartbeat:~# drbd-overview
0:r0/0 StandAlone Primary/Unknown UpToDate/DUnknown /var/lib/mysql ext4 32G 6.6G 24G 23%
ot@drbd1heartbeat:~# drbd-overview
0:r0/0 WFConnection Secondary/Unknown UpToDate/DUnknown
Split brain
root@drbd0heartbeat:~# grep split /var/log/syslog
Jun 14 16:51:58 drbd0heartbeat kernel: [ 6.652069] block drbd0: helper command: /sbin/drbdadm initial-split-brain minor-0
Jun 14 16:51:58 drbd0heartbeat kernel: [ 6.653058] block drbd0: helper command: /sbin/drbdadm initial-split-brain minor-0 exit code 0 (0x0)
Jun 14 16:51:58 drbd0heartbeat kernel: [ 6.653204] block drbd0: helper command: /sbin/drbdadm split-brain minor-0
Jun 14 16:51:58 drbd0heartbeat kernel: [ 6.654109] block drbd0: helper command: /sbin/drbdadm split-brain minor-0 exit code 0 (0x0)
Jun 14 16:54:25 drbd0heartbeat kernel: [ 6.708203] block drbd0: helper command: /sbin/drbdadm initial-split-brain minor-0
Jun 14 16:54:25 drbd0heartbeat kernel: [ 6.709194] block drbd0: helper command: /sbin/drbdadm initial-split-brain minor-0 exit code 0 (0x0)
Jun 14 16:54:25 drbd0heartbeat kernel: [ 6.709339] block drbd0: helper command: /sbin/drbdadm split-brain minor-0
Jun 14 16:54:25 drbd0heartbeat kernel: [ 6.710279] block drbd0: helper command: /sbin/drbdadm split-brain minor-0 exit code 0 (0x0)
Jun 14 16:59:15 drbd0heartbeat kernel: [ 295.508074] block drbd0: helper command: /sbin/drbdadm initial-split-brain minor-0
Jun 14 16:59:15 drbd0heartbeat kernel: [ 295.509099] block drbd0: helper command: /sbin/drbdadm initial-split-brain minor-0 exit code 0 (0x0)
Jun 14 16:59:15 drbd0heartbeat kernel: [ 295.509244] block drbd0: helper command: /sbin/drbdadm split-brain minor-0
Jun 14 16:59:15 drbd0heartbeat kernel: [ 295.510053] block drbd0: helper command: /sbin/drbdadm split-brain minor-0 exit code 0 (0x0)
he probat com diu un enllaç
primary- service mysql stop
secondary drbdadm connect all
secondary cat /proc/drbd
primary drbdadm connect all
primary cat /proc/drbd
primary service mysql start
no ha estat suficient pq entre a funciona ,
AL FINAL HA ESTAT CONTUNDENT - solució
Try following:
On primary node
root@drbd0heartbeat:~# drbdadm connect all
On secondary node
ot@drbd1heartbeat:~# drbdadm -- --discard-my-data connect all
root@drbd1heartbeat:~# cat /proc/drbd
version: 8.4.3 (api:1/proto:86-101)
srcversion: 1A9F77B1CA5FF92235C2213
0: cs:SyncTarget ro:Secondary/Primary ds:Inconsistent/UpToDate C r-----
ns:0 nr:58384 dw:58384 dr:0 al:0 bm:7 lo:1 pe:4 ua:0 ap:0 ep:1 wo:f oos:2611068
[>....................] sync'ed: 2.4% (2611068/2669452)K
finish: 0:00:44 speed: 58,384 (58,384) want: 43,000 K/sec