[DRBD-user] Dual primary question.

Dirk Bonenkamp - ProActive Software dirk at proactive.nl
Thu Apr 17 20:42:42 CEST 2014

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hi Richard,

You're useing ext3 as filesystem, this filesystem does not support 'dual
primary' mode. You need GFS or OCFS2.

Have a look:

http://www.drbd.org/users-guide/s-dual-primary-mode.html

I experimented with OCFS2, but dropped it in the end. However, it may
fit your needs...

Kind regards,

Dirk

On 17-04-14 19:58, Richard Whittaker wrote:
> Hi all:
>
> I am new to DRBD, and I think I have it setup correctly, but wanted to
> check my assumptions at the door. I have two nodes connected over a
> VPN link, and they are geographically separated by about 15
> kilometres. Their connection is not mind blowingly fast, but I am not
> looking for true realtime I/O. I am looking to replicate, at the block
> level, a qmail messaging store between the two nodes, and I like the
> idea of block level replication, because if a message comes in, I
> don't have to replicate the user's entire message store like I believe
> Unison would do.
>
> Block level replication would also be, I believe truly bi-directional.
>
> So, for my testing I have created a dual primary drbd called /dev/drbd1.
>
> Looking at /proc/drbd on both nodes shows an active Primary/Primary
> device.
>
> [root at defiant tmp]# cat /proc/drbd
> version: 8.3.15 (api:88/proto:86-97)
> GIT-hash: 0ce4d235fc02b5c53c1c52c53433d11a694eab8c build by
> mockbuild at builder17.centos.org, 2013-03-27 16:04:08
>
>  1: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate C r-----
>     ns:1728 nr:524052 dw:525780 dr:5798 al:4 bm:44 lo:0 pe:0 ua:0 ap:0
> ep:1 wo:b oos:0
> [root at defiant tmp]#
>
>  The device is mounted on both systems.
>
> /dev/drbd1 on /var/tmp type ext3 (rw)
>
> The config on both nodes is identical.
>
> global {
>         usage-count yes;
>         }
>
> common {
>         protocol C;
> }
>
> resource mailstore {
>
>         net {
>                 allow-two-primaries;
>                 after-sb-0pri discard-least-changes;
>                 after-sb-1pri discard-secondary;
>                 }
>         startup {
>                 become-primary-on both;
>                 }
>
>         on defiant.avits.ca {
>         device  /dev/drbd1;
>         disk /dev/sdc;
>         address 192.168.0.4:7789;
>         meta-disk internal;
>         }
>         on illustrious.avits.ca {
>         device /dev/drbd1;
>         disk /dev/sdb;
>         address 192.168.64.4:7789;
>         meta-disk internal;
>         }
> }
>
> Now to my logic, if I write a file to one node, it should show up on
> the other. So on 192.168.0.4, I do an ls -l /etc >/var/tmp/blah.txt,
> it should show up on BOTH systems with the same size and date stamp.
>
> ...Node 1.
>
> [root at defiant tmp]# ls -l /etc >/var/tmp/blah.txt
> [root at defiant tmp]# ls -l /var/tmp
> total 16
> -rw-r--r-- 1 root root 15893 Apr 17 10:53 blah.txt
> [root at defiant tmp]#
>
> ...Node 2.
> [root at illustrious ~]# ls -l /var/tmp
> total 32
> drwx------ 10 vpopmail vchkpw  4096 Nov 17 21:09 avits.ca
> -rw-r--r--  1 vpopmail vchkpw   165 Apr 16 13:46 blah3.txt
> -rw-r--r--  1 vpopmail vchkpw  2532 Apr 16 13:55 blah.txt
> drwx------  5 vpopmail vchkpw  4096 Aug 14  2013 example.com
> drwx------ 21 vpopmail vchkpw 16384 Apr 15 14:45 lost+found
> [root at illustrious ~]#
>
> ...and yet the filesystems are dissimilar.  Note the stuff that is
> there on one node, but not the other, and that the date stamp for the
> file that exists on both is wrong on the second node.
>
> Am I missing something, or am I expecting drbd to do something it's
> not capable of doing?...
>
> Thanks,
> Richard.
>
>
>
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user

-- 
ProActive Software <http://www.proactive.nl>
T 	023 - 5422299
 
www.proactive.nl <http://www.proactive.nl>
 
<http://nl.linkedin.com/in/dirkbonenkamp>
 
My status <skype:dirkbonenkamp?call>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20140417/8eec6cba/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.gif
Type: image/gif
Size: 3966 bytes
Desc: not available
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20140417/8eec6cba/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linkedin.gif
Type: image/gif
Size: 1965 bytes
Desc: not available
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20140417/8eec6cba/attachment-0001.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dirkbonenkamp
Type: image/png
Size: 755 bytes
Desc: not available
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20140417/8eec6cba/attachment.png>


More information about the drbd-user mailing list