DRBD

# cat /etc/drbd.d/global_common.conf 
global {
		usage-count	yes;
}
 
common {
	startup {
		degr-wfc-timeout	0;
	}
 
	net {
		cram-hmac-alg	sha1;
		shared-secret	****************;
	}
 
	disk {
		on-io-error	detach;
	}
}
 
# cat /etc/drbd.d/r0.res 
resource r0 {
	on scld.sedo.de.intern {
		volume 0 {
			device		/dev/drbd0;
			disk		/dev/vg0/lvol0;
			flexible-meta-disk	internal;
		}
		address		192.168.255.1:7788;
	}
	on ubuntu {
		volume 0 {
			device		/dev/drbd0;
			disk		/dev/sda3;
			flexible-meta-disk	internal;
		}
		address		192.168.255.2:7788;
	}
}

drbdadm disk-options --c-plan-ahead=0 --resync-rate=900M --c-fill-target=0 r0

# status
drbd-overview

# get resources
cat /etc/drbd.d/db.res | grep resource | cut -d" " -f2

# resolve split brain
dmesg | grep -i "split-brain"

# on slave (split brain victim)
drbdadm secondary db1
drbdadm connect --discard-my-data db

# on master
drbdadm connect db

https://docs.linbit.com/doc/users-guide-84/s-resolve-split-brain/

# https://wiki.ubuntuusers.de/DRBD/