Install required packages

apt install drbd-dkms drbd-utils python-drbdmanage

Check module install

modprobe drbd
modinfo drbd

Enable and start drbd cluster manager service

systemctl enable drbdmanaged
systemctl start drbdmanaged

Configure drbd9 cluster

Create drbdpool volume group on desired PVs

vgcreate drbdpool /dev/nvme0n1 /dev/mapper/disks

Initialize the drbdmanage in the master node with own parameters

drbdmanage init <node-name> <ip_drbd>

Add volume and resources

drbdmanage add-volume <volume-name> <capacity>

Note: It will create and associated resource with the same volume-name.

Deploy resources to nodes

drbdmanage deploy <resource-name> <nÂș nodes>

Just if you want to allocate volumes on desired PV

pvmove <resource-name> <pv>

Create filesystem and mount

mkfs.ext4 /dev/<resource-name>
mount /dev/<resource-name> /mnt

In drbd9 mount action will automatically trigger a Secondary -> Primary change to allow rw mount.

Types of nodes

In all types what it is shared is a block device, also in diskless nodes.

Control node

drbdmanage add-node drbd1

The cluster startup is done with drbdmanage init and it will become also a control node.

Pure controller node

drbdmanage add-node --no-storage drbd2-controller

It is like a control node but as it won't have storage, will only act a a control node or a satellite.

Satellite node

drbdmanage add-node --satellite drbd3-satellite

Pure client node

drbdmanage add-node --satellite --no-storage drbd4-client