drbd debian heartbeat samba ifconfig - problem

Discussion in 'HOWTO-Related Questions' started by mr.si, Oct 29, 2014.

  1. mr.si

    mr.si New Member

    Hi all I have some problems with my drbd / heartbeat / samba setup which I hope you can help me with!

    Firstly, I have been using the following guides to help me:


    and have been reading the forum topic:

    The initial sync went fine with aafile1 as primary and aafile2 as secondary

    The problems I have are:

    1. on failing back by re-starting heartbeat on aafile1, it does not re-become primary, I thought heartbeat was supposed to do that. After a reboot it still doesn't do it and both stay as secondary/secondary

    2. I cannot mount at boot /dev/drbd0 to mount point /data which I set up in fstab. The directory was created to enable it to mount at boot.

    3. the heartbeat virtual IP does not show in either ifconfig or ip addr show.

    My config files are as follows:

    global {
        usage-count yes;
    common {
        protocol C;
        handlers {
            pri-on-incon-degr "/usr/lib/drbd/notify-pri-on-incon-degr.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger ; reboot -f";
            pri-lost-after-sb "/usr/lib/drbd/notify-pri-lost-after-sb.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger ; reboot -f";
            local-io-error "/usr/lib/drbd/notify-io-error.sh; /usr/lib/drbd/notify-emergency-shutdown.sh; echo o > /proc/sysrq-trigger ; halt -f";
            split-brain "/usr/lib/drbd/notify-split-brain.sh root";
        startup {
            wfc-timeout 15;
            degr-wfc-timeout 60;
        net {
            cram-hmac-alg sha1;
        syncer {
            rate 10M;

    resource r0 {
        net {
            shared-secret "secretcode";
        on aafile1.domain.lan {
            device    /dev/drbd0;
            disk      /dev/mapper/aafile1vg-data;
            meta-disk internal;
        on aafile2.domain.lan {
            device    /dev/drbd0;
            disk      /dev/mapper/aafile2vg-data;
            meta-disk internal;

    logfailicty local0
    logfile /var/log/ha-log
    keepalive 2
    deadtime 30
    initdead 120
    bcast eth0
    autofailback off
    node aafile1.domain.lan aafile2.domain.lan
    aafile1.domain.lan IPaddr:: drbddisk::r0 Filesystem::/dev/drbd0::/data::ext4 smbd nmbd
    Last edited: Oct 29, 2014

Share This Page