MySQL Forums
Forum List  »  General

0: State change failed: (-2) Need access to UpToDate data
Posted by: Sushmita Mishra
Date: December 09, 2011 03:17AM

Hi ,

I am trying to implement Mysql HA using DRBD.
My drbd.conf is :
resource r0{
protocol C;
on node1{
device /dev/drbd0;
disk /dev/sdb1;
address 172.18.228.35:7788;
meta-disk internal;
}

on node2 {
device /dev/drbd0;
disk /dev/sdb1;
address 172.18.228.14:7788;
meta-disk internal;
}

startup {
wfc-timeout 0;
degr-wfc-timeout 120; # 2 minutes.
}
}

I am able to start my drbd process
cat /proc/drbd read as :
]# cat /proc/drbd
version: 8.4.0 (api:1/proto:86-100)
GIT-hash: 28753f559ab51b549d16bcf487fe625d5919c49c build by root@INBBRSEFVM22, 2011-12-09 10:55:07
0: cs:Connected ro:Secondary/Secondary ds:Diskless/Diskless C r-----
ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0


Both my systems are being configured for drbd for the first time. When I run the command to make the node 1 as primary I get the following error:

]# drbdadm -- --overwrite-data-of-peer primary r0
0: State change failed: (-2) Need access to UpToDate data
Command 'drbdsetup primary 0 --overwrite-data-of-peer' terminated with exit code 17


Please help me to resolve this error.

I tried running the following commands but received these errors:

]# drbdadm attach r0
0: Failure: (104) Can not open backing device.
Command 'drbdsetup attach 0 /dev/sdb1 /dev/sdb1 internal' terminated with exit code 10
]# drbdadm invalidate r0
0: State change failed: (-11) Device is diskless, the requested operation requires a disk
]# drbdadm syncer r0
drbdadm: Unknown command 'syncer'

I am not able to set my node as primary and thus not able to create the disk.

Options: ReplyQuote


Subject
Written By
Posted
0: State change failed: (-2) Need access to UpToDate data
December 09, 2011 03:17AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.