DRBD with OCSF2

see DRBD

=Introduction= This is a guide for DRBR with OCFS2.

The tough came with found that samba Active Directory (AD) Domain Controller (DC) sysvol is not being replicated between DC as current Samba4 known limitation.

Q: Why DRBD is not enough...

There might be case where there are multiple write access to the sysvol by multiple DC member, thus without cluster files system we might be looking for trouble since the DRBD volume are being mount by 2 or more DC member, so OCFS2 is selected for it performance and also popularity.

You can use always other Cluster files system.

= Prerequisite = Below are the kernel need.

= Packages = Please emerge the following package

DRBD Configure

2 Node Resource

When the 2nd node is up.

DRBD are now successfully setup

The initial device synchronization

Until it is done.

the initial full synchronization will commence

ocfs2 setup

Time to make a change and make the DRBD Dual Primary We only list changes here

{{File|/etc/drdb.d/global_common.conf|| handlers { pri-on-incon-degr "/usr/lib64/drbd/notify-pri-on-incon-degr.sh; /usr/lib64/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger ; reboot -f"; pri-lost-after-sb "/usr/lib64/drbd/notify-pri-lost-after-sb.sh; /usr/lib64/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger ; reboot -f"; local-io-error "/usr/lib64/drbd/notify-io-error.sh; /usr/lib64/drbd/notify-emergency-shutdown.sh; echo o > /proc/sysrq-trigger ; halt -f"; out-of-sync "/usr/lib64/drbd/notify-out-of-sync.sh root";

net { protocol C;               allow-two-primaries yes;

}}

{{File|/etc/drdb.d/r0.res|| resource r0 { startup { become-primary-on both; }       }        on amtbsrv01 { device   /dev/drbd1; disk     /dev/sda5; address  192.168.11.23:7789; meta-disk internal; }       on amtbsrv02 { device   /dev/drbd1; disk     /dev/sda5; address  192.168.11.27:7789; meta-disk internal; }       net { # allow-two-primaries yes; after-sb-0pri discard-zero-changes; after-sb-1pri discard-secondary; after-sb-2pri disconnect; } } }}