[SOLVED] Settings DRBD doesnt presist after reboot global_common.conf

tytanick

Renowned Member
Feb 25, 2013
97
3
73
Hi,

Settings written to global_common.conf doesnt work:
Code:
root@node2:/etc/drbd.d# cat global_common.conf
# DRBD is the result of over a decade of development by LINBIT.
# In case you need professional services for DRBD or have
# feature requests visit http://www.linbit.com

global {
        usage-count no;
        # minor-count dialog-refresh disable-ip-verification
        # cmd-timeout-short 5; cmd-timeout-medium 121; cmd-timeout-long 600;
}

common {
        handlers {
                # These are EXAMPLE handlers only.
                # They may have severe implications,
                # like hard resetting the node under certain circumstances.
                # Be careful when chosing your poison.

                # 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";
                # fence-peer "/usr/lib/drbd/crm-fence-peer.sh";
                # split-brain "/usr/lib/drbd/notify-split-brain.sh root";
                # out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh root";
                # before-resync-target "/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 15 -- -c 16k";
                # after-resync-target /usr/lib/drbd/unsnapshot-resync-target-lvm.sh;
        }

        startup {
                # wfc-timeout degr-wfc-timeout outdated-wfc-timeout wait-after-sb
        }

        options {
                # cpu-mask on-no-data-accessible
        }

        disk {
      on-io-error             detach;
        no-disk-flushes ;
        no-disk-barrier;
        c-plan-ahead 10;
        c-fill-target 24M;
        c-min-rate 10M;
        c-max-rate 100M;
                # size on-io-error fencing disk-barrier disk-flushes
                # disk-drain md-flushes resync-rate resync-after al-extents
                # c-plan-ahead c-delay-target c-fill-target c-max-rate
                # c-min-rate disk-timeout
        }

        net {
                protocol C;
        # max-epoch-size          20000;
        max-buffers             36k;
        sndbuf-size            1024k ;
        rcvbuf-size            2048k;

                # allow-two-primaries yes;
                # protocol timeout max-epoch-size max-buffers unplug-watermark
                # connect-int ping-int sndbuf-size rcvbuf-size ko-count
                # allow-two-primaries cram-hmac-alg shared-secret after-sb-0pri
                # after-sb-1pri after-sb-2pri always-asbp rr-conflict
                # ping-timeout data-integrity-alg tcp-cork on-congestion
                # congestion-fill congestion-extents csums-alg verify-alg
                # use-rle
        }
}

But if i write those settings to:
/var/lib/drbd.d/drbdmanage_global_common.conf
They DO work after /etc/init.d/drbd restart , but after reboot they dont :P and the file is empty.
Anybody know how to solve it ?
Where should be settings ?
P.S withouts those settings sync speed is like 20mbit/s but with those settings speed is 800mbit/s :)
 
according to the drbd devs, the values in /var/lib/drbd.d/drbdmanage_global_common.conf
should be set via drbdmanage, not by manually editing the file.
 
if I understood correctly, setting it once via drbdmanage should suffice
 
THX !!!!
I finally solved it :)

Scenario:
Fresh booted nodes.
I am creating new disk via GUI. Syncing starts and presist at about 20-30mbits/s
Then i just simply execute this command to only one node (it will automaticly send to other nodes too)
you can monitor if changes apply by:
Code:
watch 'cat /var/lib/drbd.d/drbdmanage_global_common.conf'
Code:
atop 2
Commands that execute new settings are: (this if for 1 gbit link, if you have more play with c-fill-target or others)
Code:
drbdmanage net-options --common --max-buffers 131071 --max-epoch-size 20000 --sndbuf-size 2048000 --rcvbuf-size 2048000
drbdmanage peer-device-options --common --c-max-rate 4194304 --c-plan-ahead 10 --c-fill-target 20000



If it presists after reboot then great. if it doesnt just simply add to rc.local or in cron perhaps.
Anyway this is finally solved :)

Also in cache mode in VM i set directsync and i have more iops inside VM. (I presime that is safe ?)