Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
OK. This didn't quite go to plan.
I assigned the proper IP address to the DRDB NIC on the secondary
successfully.
But:
Firstly my version of drbdadm doesn't support "--discard-my-data"
# "drbdadm connect --discard-my-data all"
drbdadm: unrecognized option `--discard-my-data'
try 'drbdadm help'
A bit of Googling suggested that this might help:
# drbdadm -- --discard-my-data connect all
- allegedly to pass the option straight through to drbdsetup.
But that gave an error - complaining that:
0: Failure: (123) --discard-my-data not allowed when primary.
So I then tried:
# drbdadm secondary all
0: State change failed: (-12) Device is held open by someone
Command 'drbdsetup 0 secondary' terminated with exit code 11
1: State change failed: (-12) Device is held open by someone
Command 'drbdsetup 1 secondary' terminated with exit code 11
pves2:/etc/network#
Google then suggested:
# vgchange -an <volume group>
.. so I ran that on drbdvg and drbdvg1.
Then "drbdadm secondary all" worked successfully, following
which, "drbdadm connect --discard-my-data all" was also
happy to run.
I watched /proc/drbd while the mirror synced up - it displays
nice little progress bars like this:
# cat /proc/drbd
version: 8.3.7 (api:88/proto:86-91)
srcversion: EE47D8BF18AC166BE219757
0: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent C r----
ns:1253940 nr:0 dw:41622456 dr:181039187 al:519664 bm:519738 lo:18 pe:223 ua:60 ap:8 ep:1 wo:b oos:10332000
[=>..................] sync'ed: 10.8% (10088/11300)M
finish: 0:17:43 speed: 9,672 (12,680) K/sec
1: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent C r----
ns:1296696 nr:0 dw:4851300 dr:17169105 al:1699 bm:1946 lo:0 pe:120 ua:0 ap:8 ep:1 wo:b oos:742860
[===========>........] sync'ed: 63.6% (742860/2034536)K
finish: 0:00:46 speed: 16,108 (13,180) K/sec
.. and it completed successfully. Comfortingly, the VMs on the first node
continued to work properly.
Anyway .. since it was now in Primary/Secondary and the logical volumes were
unavailable, I rebooted the second box.
And finally,
# cat /proc/drbd
version: 8.3.7 (api:88/proto:86-91)
srcversion: EE47D8BF18AC166BE219757
0: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate C r----
ns:11689952 nr:0 dw:41746996 dr:191403115 al:522263 bm:522764 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
1: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate C r----
ns:2073056 nr:0 dw:4888628 dr:17917209 al:1706 bm:2088 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
#
Deep joy.
Many thanks for the help, and I hope this thread will prove useful to
some other victim of their career choice at some point in the future.
James