[DRBD-user] allow-two-primaries (hot migration) and three nodes...
Stéphane Rivière
stef at genesix.org
Mon Dec 21 19:30:55 CET 2020
Hi Thomas,
> Yes, to be totally save, one should use drbdsetup to change this value temporarily only. So workflow would look something like that:
>
> 1.) drbdsetup net-options <resource> --allow-two-primaries yes
> 2.) xl migrate --live <domu> <host>
> 3.) drbdsetup net-options <resource> --allow-two-primaries no
>
> ...and the resource would be set to "no".
After following your advice, I face a strange behaviour with a three
nodes DRBD setup.
The command "drbdsetup net-options <resource> --allow-two-primaries yes"
seems to have no effect...
Obviouvsly the dual primary mode parameter in each global_conf has been
deleted and all ressources has been stopped...
On the primary node and the destination node, I've ran (even it was now
the default) : drbdsetup net-options <resource> --allow-two-primaries no
Then, I can plays with drbdsetup primary/secondary ressources, hot
migrates instances, etc...
When migrating I set destination volume as primary¹ and once the
migration is done, I set the former volume as secondary...
¹ So, at this very moment, I have two primary volumes : the running one
and the destination one.
I don't use "Xen script DRBD automation" and have not replaced "phy" by
"drbd" in xen disk parameter instance config file as all is managed by
our own script...
So I'm shure I'm doing wrong with this command.
I wonder what is the right use and range of it.
How do you use it ?
Freundliche Grüße der Insel Oléron
#----------------------------------------------------------------------------
#--- DRBD instance conf - Configuration DRBD pour GENESIX v3 (dom0 Xen)
#----------------------------------------------------------------------------
resource i1c1 {
device /dev/drbd1;
disk /dev/vg-gnx-001/i1c1-disk;
meta-disk /dev/vg-gnx-001/i1c1-meta;
on n201c1.genesix.org {
address 10.0.1.201:63001;
node-id 1;
}
on n202c1.genesix.org {
address 10.0.1.202:63001;
node-id 2;
}
on n250c1.genesix.org {
address 10.0.1.250:63001;
node-id 3;
}
connection-mesh {
hosts n201c1.genesix.org n202c1.genesix.org n250c1.genesix.org;
}
}
#----------------------------------------------------------------------------
#--- EOF
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
#--- DRBD global conf - Configuration DRBD pour GENESIX v3 (dom0 Xen)
#----------------------------------------------------------------------------
global {
minor-count 200; # 200 devices max per node for 200 instances
# More a theorical limit than anything else)
udev-always-use-vnr; # treat implicit the same as explicit volumes
usage-count yes; # Statistics count for DRBD authors
}
common {
handlers {
}
startup {
}
options {
# 76543210
cpu-mask FF; # 04 -> 00000100 -> CPU 2 only
}
disk {
on-io-error detach;
resync-rate 1500M;
}
net {
protocol C;
verify-alg sha1;
}
}
#----------------------------------------------------------------------------
#--- EOF
#----------------------------------------------------------------------------
--
Stéphane Rivière
Ile d'Oléron - France
More information about the drbd-user
mailing list