[Samba] Floating IP breaks AD replication

Sven Wick sven.wick at gmx.de
Mon Nov 23 16:50:31 UTC 2020

> we point them to somedom.contoso.com which is then
> resolved to both and the client can pick

I want to avoid Round-Robin DNS

> You cannot use CTDB with AD DCs

You can.


/etc/ctdb/public_addresses ens18


#!/usr/bin/env bash
function monitor_ldap() {
  ldbsearch -H ldap:// -s base -b "" vendorName 2>/dev/null | grep -qi samba 

  if [[ $? -eq 0 ]]; then
    return 0
    echo "ldbsearch received no info"
    return 1
case "$1" in
    monitor_ldap || exit 1
exit 0

I used to use keepalived for this kind of setups
but ctdb is a neat solution so I switched.

When I change


from ens18
to ens18

the replication does not break
because x.x.60.0 is not the internal DNS Zone

This setup allows me to upgrade, reboot
each DC without downtime because
ctdb checks for samba and moves the floating IP.

More information about the samba mailing list