Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Am Donnerstag, 14. Januar 2010 10:42:17 schrieb Patrick Matthäi:
> Hello list,
>
> I have got the following configuration (tested out with drbd version
> 2:8.3.2-1~bpo50+1 and 2:8.0.14-2) on two Debian Lenny/amd64 servers:
>
> global { usage-count no; }
> common {
> protocol C;
> startup {
> become-primary-on both;
> wfc-timeout 60;
> degr-wfc-timeout 60;
> }
> disk { on-io-error detach; }
> net {
> allow-two-primaries;
> after-sb-0pri discard-younger-primary;
> after-sb-1pri discard-secondary;
> after-sb-2pri call-pri-lost-after-sb;
> }
> }
> resource r0 {
> disk {
> fencing resource-only;
> on-io-error detach;
> }
> syncer {
> rate 100M;
> al-extents 257;
> }
> net {
> after-sb-0pri disconnect;
> after-sb-1pri disconnect;
> after-sb-2pri disconnect;
> rr-conflict disconnect;
> }
> handlers {
> pri-on-incon-degr "echo o > /proc/sysrq-trigger ; halt f";
> pri-lost-after-sb "echo o > /proc/sysrq-trigger ; halt f";
> local-io-error "echo o > /proc/sysrq-trigger ; halt f";
> outdate-peer "/usr/lib/heartbeat/drbd-peer-outdater -t 5";
> }
> startup {
> degr-wfc-timeout 120; # 2 minutes.
> become-primary-on both;
> }
> on mysql1 {
> device /dev/drbd0;
> disk /dev/sda4;
> address 192.168.123.6:7789;
> meta-disk internal;
> }
> on mysql2 {
> device /dev/drbd0;
> disk /dev/sdb1;
> address 192.168.123.17:7789;
> meta-disk internal;
> }
>
>
> In the primary/secondary mode, everything is perfect, but if I use the
> primary/primary mode and do the following, it fails:
>
>
> · Create a file foo.txt on mysql1
>
> · Create a file blubb.txt on mysql2
>
> · On both nodes, the file of the other one does not appear
>
> · If I umount the device, wait a few seconds and mount it again,
> the file foo.txt (created on mysql1) appears on mysql2
>
> · The file blubb.txt (created on mysql2) is deleted on both hosts
>
> /proc/drbd looks everytime good.
>
> For example:
> mysql1:~# cat /proc/drbd
> version: 8.3.2 (api:88/proto:86-90)
> GIT-hash: dd7985327f146f33b86d4bff5ca8c94234ce840e build by phil at fat-tyre,
> 2009-07-03 15:35:39 0: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate
> C r---n
> ns:4343908 nr:108 dw:4344016 dr:3337 al:4530 bm:0 lo:0 pe:0 ua:0 ap:0
> ep:1 wo:b oos:0
>
> mysql2:~# cat /proc/drbd
> version: 8.3.2 (api:88/proto:86-90)
> GIT-hash: dd7985327f146f33b86d4bff5ca8c94234ce840e build by phil at fat-tyre,
> 2009-07-03 15:35:39 0: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate
> C r----
> ns:108 nr:4343908 dw:4344016 dr:648 al:3 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1
> wo:b oos:0
>
>
> Any ideas?
>
>
> Thanks in advance.
hi,
My guess is that your net section is missing the
allow-two-primaries;
option.
See: http://www.drbd.org/users-guide-emb/s-enable-dual-primary.html
--
Dr. Michael Schwartzkopff
MultiNET Services GmbH
Addresse: Bretonischer Ring 7; 85630 Grasbrunn; Germany
Tel: +49 - 89 - 45 69 11 0
Fax: +49 - 89 - 45 69 11 21
mob: +49 - 174 - 343 28 75
mail: misch at multinet.de
web: www.multinet.de
Sitz der Gesellschaft: 85630 Grasbrunn
Registergericht: Amtsgericht München HRB 114375
Geschäftsführer: Günter Jurgeneit, Hubert Martens
---
PGP Fingerprint: F919 3919 FF12 ED5A 2801 DEA6 AA77 57A4 EDD8 979B
Skype: misch42