sudo drbdadm -f primary r0I would get this error:
0: State change failed: (-2) Need access to UpToDate data
Command 'drbdsetup 0 primary' terminated with exit code 17Checking the status reveals:
cat /proc/drbdversion: 8.3.11 (api:88/proto:86-96)
srcversion: DA5A13F16DE6553FC7CE9B2
0: cs:Connected ro:Secondary/Secondary ds:Inconsistent/Inconsistent 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:f oos:1953460984The reason for this is because neither server can tell if it has the correct data, so we need to invalidate one of them, so the other one thinks it is up-to-date. This is pretty simple. On the secondary server, simple use this command (replacing r0 with your resource):
sudo drbdadm invalidate r0That's it. You can now successfully set your primary server with:
sudo drbdadm -f primary r0Now check your status:
cat /proc/drbdand you should see something similar to:
version: 8.3.11 (api:88/proto:86-96)
srcversion: DA5A13F16DE6553FC7CE9B2
0: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent C r-----
ns:1818624 nr:0 dw:0 dr:1819288 al:0 bm:110 lo:0 pe:48 ua:0 ap:0 ep:1 wo:f oos:1951645432
[>....................] sync'ed: 0.1% (1905900/1907676)Mfinish: 16:47:51 speed: 32,260 (30,772) K/secHuzzah, success!
No works for me....still same error !!
ReplyDelete# drbdadm primary r0
0: State change failed: (-2) Need access to UpToDate data
Command 'drbdsetup primary 0' terminated with exit code 17
It worked for me at least. Thanks.
ReplyDeleteThanks ! It works.
ReplyDeleteThanks a lot!
ReplyDelete