Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Isse with DRBD, OSS Cluster

  1. #1
    blason is offline Elite Member
    Join Date
    Sep 2011
    Posts
    256
    Rep Power
    3

    Default Isse with DRBD, OSS Cluster

    Hi Fellas,

    I am configuring my first DRBD cluster on CentOS 5.5 and facing hell lot of issues however I managed to configure the DRBD on both the nodes and somehow I am both the nodes are unable to detect each other. Also i do have few queries and would appreciate if DRBD Gurus out there can help me understand.

    My scenario is like this

    mail1.clus.net 192.168.1.122
    mail2.clus.net 192.168.1.123

    Here is the /etc/init.d status on mail1
    [root@mail1 ~]# /etc/init.d/drbd status
    drbd driver loaded OK; device status:
    version: 8.2.6 (api:88/proto:86-88)
    GIT-hash: 3e69822d3bb4920a8c1bfdf7d647169eba7d2eb4 build by buildsvn@c5-i386-build, 2008-10-03 11:42:32
    m:res cs st ds p mounted fstype
    0:r0 StandAlone Primary/Unknown UpToDate/DUnknown - /opt ext3

    ###############

    Hoever on seciondary is uable to detect Primary.

    Can someone shed light on this issue?

    Also my queries are

    1] Since after every reboot though my DRBD services comes up I do need to execute below command on both the nodes else they unable to detect their role from drbd.conf

    drbdsetup /dev/drbd0 primary -o AND then mount /dev/drbd0 /opt

    So, I would like to know that where I can put that command so that same will be taken after reboot and will survive

    Also, do I need to install zimbra before DRBD or can that be installed after everything is finished?

  2. #2
    blason is offline Elite Member
    Join Date
    Sep 2011
    Posts
    256
    Rep Power
    3

    Default

    Ok, here you go. Well at first I tried everything at one go by following article poseted on other site and I messed up the entire stuff hence I decided to follow one by one approach.
    Here are my files

    Two nodes that I need to play with are

    mail1.clus.net 192.168.1.122
    mail2.clus.net 192.168.1.123

    Domain - clus.net
    #####################

    This is on 1.122 [mail1.clus.net]
    127.0.0.1 localhost.localdomain localhost
    192.168.1.122 mail1.clus.net
    192.168.1.123 mail2.clus.net
    ::1 localhost6.localdomain6 localhost6

    *****************
    global {
    usage-count yes;
    }

    common {
    syncer {
    rate 100M;
    al-extents 257;
    }
    }

    resource r0 {

    protocol C;

    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";
    }
    startup {
    #become-primary-on both; ### For Primary/Primary ###
    become-primary-on mail1.clus.net;
    degr-wfc-timeout 60;
    wfc-timeout 30;
    }

    disk {
    on-io-error detach;
    }

    net {
    # allow-two-primaries; ### For Primary/Primary ###
    cram-hmac-alg sha1;
    shared-secret "mysecret";
    after-sb-0pri discard-zero-changes;
    after-sb-1pri violently-as0p;
    after-sb-2pri violently-as0p;
    }

    on mail1.clus.net {
    device /dev/drbd0;
    disk /dev/sdb1;
    address 192.168.1.122:7788;
    meta-disk internal;
    }

    on mail2.clus.net {
    device /dev/drbd0;
    disk /dev/sdb1;
    address 192.168.1.123:7788;
    meta-disk internal;
    }
    }
    *************
    [root@mail1 ~]# fdisk -l

    Disk /dev/sda: 21.4 GB, 21474836480 bytes
    255 heads, 63 sectors/track, 2610 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 2418 19422553+ 83 Linux
    /dev/sda2 2419 2609 1534207+ 82 Linux swap / Solaris

    Disk /dev/sdb: 10.7 GB, 10737418240 bytes
    64 heads, 32 sectors/track, 10240 cylinders
    Units = cylinders of 2048 * 512 = 1048576 bytes

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 10240 10485744 83 Linux
    ********************
    [root@mail1 ~]# cat /proc/drbd
    version: 8.2.6 (api:88/proto:86-88)
    GIT-hash: 3e69822d3bb4920a8c1bfdf7d647169eba7d2eb4 build by buildsvn@c5-i386-build, 2008-10-03 11:42:32
    0: cs:StandAlone st:Primary/Unknown ds:UpToDate/DUnknown r---
    ns:0 nr:0 dw:0 dr:0 al:0 bm:3 lo:0 pe:0 ua:0 ap:0 oos:319116

    ##############################
    On 1.123 [mail2.clus.net]

    # that require network functionality will fail.
    127.0.0.1 localhost.localdomain localhost
    192.168.1.122 mail1.clus.net
    192.168.1.123 mail2.clus.net
    ::1 localhost6.localdomain6 localhost6

    ********************
    global {
    usage-count yes;
    }

    common {
    syncer {
    rate 100M;
    al-extents 257;
    }
    }

    resource r0 {

    protocol C;

    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";
    }

    startup {
    # become-primary-on both; ### For Primary/Primary ###
    degr-wfc-timeout 60;
    wfc-timeout 30;
    }

    disk {
    on-io-error detach;
    }

    net {
    # allow-two-primaries; ### For Primary/Primary ###
    cram-hmac-alg sha1;
    shared-secret "mysecret";
    after-sb-0pri discard-zero-changes;
    after-sb-1pri violently-as0p;
    after-sb-2pri violently-as0p;
    }

    on mail1.clus.net {
    device /dev/drbd0;
    disk /dev/sdb1;
    address 192.168.1.122:7788;
    meta-disk internal;
    }

    on mail2.clus.net {
    device /dev/drbd0;
    disk /dev/sdb1;
    address 192.168.1.123:7788;
    meta-disk internal;
    }
    }
    ***************
    root@mail2 ~]# cat /proc/drbd
    version: 8.2.6 (api:88/proto:86-88)
    GIT-hash: 3e69822d3bb4920a8c1bfdf7d647169eba7d2eb4 build by buildsvn@c5-i386-build, 2008-10-03 11:42:32
    0: cs:StandAlone st:Secondary/Unknown ds:UpToDate/DUnknown r---
    ns:0 nr:0 dw:0 dr:0 al:0 bm:1 lo:0 pe:0 ua:0 ap:0 oos:8192

    ********

    The issue right now I see is both the peers are detecting each other I am not able to mount the drive /dev/drbd0 /opt on other secondary box

    [root@mail1 ~]# mount -t ext3 /dev/drbd0 /opt/
    [root@mail1 ~]#

    *****
    [root@mail2 ~]# mount -t ext3 /dev/drbd0 /opt/
    mount: block device /dev/drbd0 is write-protected, mounting read-only
    mount: Wrong medium type

    What could be the issue?

  3. #3
    blason is offline Elite Member
    Join Date
    Sep 2011
    Posts
    256
    Rep Power
    3

    Default

    Argh!!! my DRBD and herbeat is now up but not sure why /dev/drb0 is bing not being mounted on mail2 automatically?
    Again this is CentOS5.5 and I am seeing drbddisk script under /etc/ha.d/resources, now any clue what that can be used with Hearbeat so that automatic fail over can happen.

  4. #4
    blason is offline Elite Member
    Join Date
    Sep 2011
    Posts
    256
    Rep Power
    3

    Default

    So, sorry about it rather I was searcing on forum and found similar thread hence I directly started posting there and before that I had initiated my own thread.

    So, for my reference would it be possible to share your haresource and ha.cf file? I can quickly compare my wrong one [may be] against good one.

  5. #5
    blason is offline Elite Member
    Join Date
    Sep 2011
    Posts
    256
    Rep Power
    3

    Default

    Greattt...finally my ha and drbd started working now since I got a hang of It. I am planning to remove the RPM; backup the files then follow the standard sequence. i.e first Zimbra, then drbd and then heartbeat.

    However one thing confuses me and its a prerequisite about fiddling with hostnames and IP addresses. Since zimbra very much rely on correct hostname and domain name; MX records how can that be taken care while integrating all those components. Would you please shed some light on that.

  6. #6
    blason is offline Elite Member
    Join Date
    Sep 2011
    Posts
    256
    Rep Power
    3

    Default

    Right, this kindaa information I was looking for rather I was thinking other way hence got confused.

  7. #7
    blason is offline Elite Member
    Join Date
    Sep 2011
    Posts
    256
    Rep Power
    3

    Default

    Now when integrating this stuff with zimbra I faced an issue agin. Now my query is
    1] Being a CentOS I do not have S99zimbra script instead everything is /etc/init.d/zimbra and of course we dont need to remove that, do we?
    2] What should be DNS setup since I installed the zimbra as instructed using VIP name and IP address but still somehow the /opt partition is not getting mounted properly
    3] I was using dnsmasq file while installing zimbra but had to stop that since it had a different hostname.
    4] Now would you please confirm your DNS setting or may i know if you are using external DNS server for your DRBD, Zimbra cluster?

  8. #8
    blason is offline Elite Member
    Join Date
    Sep 2011
    Posts
    256
    Rep Power
    3

    Default

    Now I am stuck up at last part my cluster without zimbra works perfectly but when I try to install zimbra and then build the cluster, crap something goes wrong or may be I am doing something wrong. Can you please help me into the last part? i,e zimbra installation?

    I have just followed the exact sequence installed the zimbra, stopped the services then renamed /etc/sysconfig/network and /etc/hosts file to new IP address and hostname. then installed and configured DRBD and Heartbeat but something is not working. not sure what

  9. #9
    blason is offline Elite Member
    Join Date
    Sep 2011
    Posts
    256
    Rep Power
    3

    Default

    yesss...finally my entire cluster is done...I have just built OSS cluster. Thank a ton vavai for your valuable help...I really appreciate that

  10. #10
    blason is offline Elite Member
    Join Date
    Sep 2011
    Posts
    256
    Rep Power
    3

    Default

    Setting up zimbra cluster again with DRBD and facing below issue can someone please shed some light?

    [root@mail1 ~]# /etc/init.d/zimbra start
    Host mail.oasis.net
    Starting ldap...Done.
    Failed.
    Failed to start slapd. Attempting debug start to determine error.
    daemon: bind(7) failed errno=99 (Cannot assign requested address)
    slap_open_listener: failed on ldap://mail.oasis.net:389

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Zimbra OSS Cluster with GlusterFS and VRRP
    By blason in forum Administrators
    Replies: 1
    Last Post: 12-31-2011, 04:46 PM
  2. [SOLVED] Zimbra Cluster with drbd won't start
    By tibby in forum Administrators
    Replies: 24
    Last Post: 11-26-2010, 05:03 AM
  3. Replies: 12
    Last Post: 05-03-2008, 11:44 AM
  4. zcs Red Cat cluster (4) installation problem
    By alessio in forum Installation
    Replies: 3
    Last Post: 02-21-2008, 08:18 AM
  5. Zimbra cluster and postfix smtp_bind_address
    By Lebha in forum Administrators
    Replies: 8
    Last Post: 02-05-2008, 02:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •