Revision [3749]
Last edited on 2010-07-09 21:39:45 by KenFongAdditions:
max-buffers 8000;
max-epoch-size 8000;
max-epoch-size 8000;
Revision [2813]
Edited on 2009-07-17 09:11:17 by WikiAdminAdditions:
Then on both node, start the drbd service. Make sure the ports defined in drbd.conf are accessible. On freshly installed redhat/centos, iptables may stand in your way. Do what you need to.
Deletions:
Revision [2048]
Edited on 2008-10-23 01:11:06 by WikiAdminAdditions:
==Force a rebuild / verify consistency==
# detects inconsistency - requires verify-alg option in syncer section
cat /proc/drbd
# detects inconsistency - requires verify-alg option in syncer section
cat /proc/drbd
Deletions:
# detects inconsistency
Revision [1978]
Edited on 2008-10-03 11:30:05 by WikiAdminAdditions:
wfc-timeout 30;
Revision [1815]
Edited on 2008-07-15 06:33:25 by WikiAdminAdditions:
# To maximize thruput for resync temporarily:
drbdsetup /dev/drbd0 syncer -r 50M
# To revert the changes
drbdadm adjust mydata
drbdsetup /dev/drbd0 syncer -r 50M
# To revert the changes
drbdadm adjust mydata
Revision [1814]
Edited on 2008-07-15 06:30:34 by WikiAdminAdditions:
>>To activate any configuration changes, do a "drbdadm adjust mydata">>
Deletions:
Revision [1813]
Edited on 2008-07-15 06:30:17 by WikiAdminAdditions:
>>To activate any configuration changes, do a "drbdadm adjust mydata"
Revision [1812]
Edited on 2008-07-15 03:43:41 by WikiAdminAdditions:
On secondary:
Revision [1811]
Edited on 2008-07-15 01:30:07 by WikiAdminAdditions:
%%(text;drbd-8.2.conf)
global {
usage-count yes;
common {
rate 20M;
verify-alg md5;
handlers {
# shutdown heartbeat, if installed, on degrade to prevent failback to prevent data inconsistency
pri-on-incon-degr "logger -t HEARTBEAT: Primary inconsistent; service heartbeat stop";
on-io-error detach;
device /dev/drbd0;
disk /dev/vg0/dr_data;
flexible-meta-disk /dev/vg0/dr_meta;
on db01.prod.xxx.com {
address 10.0.0.231:7789;
on db02.prod.xxx.com {
address 10.0.0.232:7789;
%%(text;drbd-8.1.conf)
global {
usage-count yes;
common {
rate 20M;
verify-alg md5;
handlers {
# shutdown heartbeat, if installed, on degrade to prevent failback to prevent data inconsistency
pri-on-incon-degr "logger -t HEARTBEAT: Primary inconsistent; service heartbeat stop";
on-io-error detach;
device /dev/drbd0;
disk /dev/vg0/dr_data;
flexible-meta-disk /dev/vg0/dr_meta;
on db01.prod.xxx.com {
address 10.0.0.231:7789;
on db02.prod.xxx.com {
address 10.0.0.232:7789;
%%(text;drbd-8.1.conf)
Revision [1807]
Edited on 2008-07-14 21:50:29 by WikiAdminAdditions:
==Preparing the storage sub-system==
For DRBD, one can choose to use internal meta-data, or store meta-data on a separate partition. I'll use an external meta-data partition. The size of that partition is roughly DATA_PARTITION/32768+1. That's roughly 0.008% of the data partition. The actual formula can be found at http://www.drbd.org/users-guide/ch-internals.html#s-meta-data-size
[>...................] sync'ed: 3.0% (29771/30670)M
finish: 2:21:08 speed: 3,456 (11,508) K/sec
resync: used:1/31 hits:57744 misses:57 starving:0 dirty:0 changed:57
act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0
device /dev/drbd0;
disk /dev/cciss/c0d0p6;
address 10.0.0.2:7789;
meta-disk /dev/cciss/c0d0p5[0];
device /dev/drbd0;
disk /dev/cciss/c0d0p6;
address 10.0.0.1:7789;
meta-disk /dev/cciss/c0d0p5[0];
For DRBD, one can choose to use internal meta-data, or store meta-data on a separate partition. I'll use an external meta-data partition. The size of that partition is roughly DATA_PARTITION/32768+1. That's roughly 0.008% of the data partition. The actual formula can be found at http://www.drbd.org/users-guide/ch-internals.html#s-meta-data-size
[>...................] sync'ed: 3.0% (29771/30670)M
finish: 2:21:08 speed: 3,456 (11,508) K/sec
resync: used:1/31 hits:57744 misses:57 starving:0 dirty:0 changed:57
act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0
device /dev/drbd0;
disk /dev/cciss/c0d0p6;
address 10.0.0.2:7789;
meta-disk /dev/cciss/c0d0p5[0];
device /dev/drbd0;
disk /dev/cciss/c0d0p6;
address 10.0.0.1:7789;
meta-disk /dev/cciss/c0d0p5[0];
Deletions:
finish: 2:21:08 speed: 3,456 (11,508) K/sec
resync: used:1/31 hits:57744 misses:57 starving:0 dirty:0 changed:57
act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0
device /dev/drbd0;
disk /dev/cciss/c0d0p6;
address 10.0.0.2:7789;
meta-disk /dev/cciss/c0d0p5[0];
device /dev/drbd0;
disk /dev/cciss/c0d0p6;
address 10.0.0.1:7789;
meta-disk /dev/cciss/c0d0p5[0];
Revision [1498]
Edited on 2008-03-17 16:31:11 by WikiAdminAdditions:
==Force a full sync==
Version 8.2.4 added online validation. Prior to that, one can only invalidate the failed node and force a full resync.
Prior to 8.2.4
bad node# drbdadm disconnect all; drbdadm invalidate all; drbdadm connect all
good node# drbdadm connect all
On 8.2.4
# detects inconsistency
drbdadm verify resource
# recover inconsistency
drbdadm disconnect resource
drbdadm connect resource
Version 8.2.4 added online validation. Prior to that, one can only invalidate the failed node and force a full resync.
Prior to 8.2.4
bad node# drbdadm disconnect all; drbdadm invalidate all; drbdadm connect all
good node# drbdadm connect all
On 8.2.4
# detects inconsistency
drbdadm verify resource
# recover inconsistency
drbdadm disconnect resource
drbdadm connect resource
Revision [947]
Edited on 2007-09-07 07:38:59 by WikiAdminAdditions:
# shutdown heartbeat, if installed, on degrade to prevent failback to prevent data inconsistency
incon-degr-cmd "service heartbeat stop";
Revision [941]
Edited on 2007-09-06 23:49:46 by WikiAdminAdditions:
==Testing fail-back==
1. On node1> drbdadm invalidate mydata
2. On node2> restart drbd
3. synchronization will start automatically
1. On node1> drbdadm invalidate mydata
2. On node2> restart drbd
3. synchronization will start automatically
Revision [935]
Edited on 2007-09-06 08:06:54 by WikiAdminAdditions:
Heartbeat: http://www.linuxjournal.com/article/5862 http://www.linux-ha.org/GettingStarted
Deletions:
Revision [934]
Edited on 2007-09-06 07:38:03 by WikiAdminAdditions:
Heartbeat: http://www.linuxjournal.com/article/5862
Revision [933]
Edited on 2007-09-06 07:28:28 by WikiAdminAdditions:
Even better: http://marksitblog.blogspot.com/2007/07/mysql-5-high-availability-with-drbd-8.html
Revision [932]
Edited on 2007-09-06 02:18:43 by WikiAdminAdditions:
address 10.0.0.2:7789;
address 10.0.0.1:7789;
address 10.0.0.1:7789;
Deletions:
address 202.168.213.12:7789;
Revision [931]
Edited on 2007-09-06 02:18:00 by WikiAdminAdditions:
3. drbdadm -d adjust mydata # check your config with -d (dry-run) option
5. drbdadm adjust mydata # activate your config
5. drbdadm adjust mydata # activate your config
Deletions:
5. drbdadm adjust mydata
Revision [930]
Edited on 2007-09-06 02:16:52 by WikiAdminAdditions:
SVN Revision: 3048 build by root@prod01xxx.org, 2007-09-06 12:42:29
on prod02.xxx.org {
on prod01.xxx.org {
on prod02.xxx.org {
on prod01.xxx.org {
Deletions:
on prod02.jade-adf.org {
on prod01.jade-adf.org {