DRBD and LINSTOR the easy way

tested on focal

Install

on all nodes

v9 won’t always build, but it does with ubuntu’s official kernel

apt install linux-generic
dpkg -l | grep headers

#add-apt-repository ppa:npalix/coccinelle
#apt install coccinelle

add-apt-repository ppa:linbit/linbit-drbd9-stack
ls -lF /lib/modules/`uname -r`/build
apt install drbd-dkms #postfix: local only
apt install drbd-utils
apt install linstor-controller linstor-satellite linstor-client
#python-linstor
dpkg -l | grep linstor

Cluster setup

on all nodes

systemctl enable --now linstor-controller
systemctl start linstor-controller
linstor node list

#LS_CONTROLLERS=lin1,lin2,lin3 linstor node list
#vi /etc/linstor/linstor-client.conf

#[global]
#controllers=lin1,lin2,lin3

on a single node

linstor node create lin1 10.3.3.231
linstor node create lin2 10.3.3.232
linstor node create lin3 10.3.3.233

Storage pools

all nodes

    pvcreate /dev/xvdb
    vgcreate vdisks /dev/xvdb

controller only

linstor storage-pool create lvm lin1 vpool vdisks
linstor storage-pool create lvm lin2 vpool vdisks
linstor storage-pool create lvm lin3 vpool vdisks
#linstor storage-pool delete lin3 vpool
linstor storage-pool list

or at once

#linstor physical-storage list
#linstor physical-storage create-device-pool \
    --pool-name vdisks LVMTHIN lin1 /dev/xvdb \
    --storage-pool vpool

Storage resources

linstor resource-group create vgroup --storage-pool vpool --place-count 2
linstor volume-group create vgroup
linstor resource-group spawn-resources vgroup vres 2G
linstor resource-group spawn-resources vgroup vres1 2G
linstor resource-group spawn-resources vgroup vres2 2G
linstor resource list
#linstor resource delete lin2 lin3 vres2

TODO

Troubleshooting

there is no such custom-kernel-header package…

Setting up drbd-dkms (9.0.24-1ppa1~focal1) ...
Loading new drbd-9.0.24-1ppa1~focal1 DKMS files...
It is likely that 5.2.21.domureiser4 belongs to a chroot's host
Building for 5.2.21.domureiser4, 5.2.21.lightUreiser4 and 5.4.0-45-generic
Building initial module for 5.2.21.domureiser4
ERROR (dkms apport): kernel package linux-headers-5.2.21.domureiser4 is not supported
Error! Bad return status for module build on kernel: 5.2.21.domureiser4 (x86_64)
Consult /var/lib/dkms/drbd/9.0.24-1ppa1~focal1/build/make.log for more information.
dpkg: error processing package drbd-dkms (--configure):
 installed drbd-dkms package post-installation script subprocess returned error exit status 10

even from source with /usr/src/domU/ in place, it didnt build against a custom kernel

drbd-kernel-compat/gen_patch_names.c: In function ‘main’:
drbd-kernel-compat/gen_patch_names.c:287:3: warning: #warning "Unknown bio rw flags, check compat layer" [-Wcpp]
  287 | # warning "Unknown bio rw flags, check compat layer"
      |   ^~~~~~~
cat: drbd-kernel-compat/patches/claim_disk__no_link__no_claim.patch: No such file or directory

==> reverting back to ubuntu’s official kernel

Resources

download

https://www.linbit.com/linbit-software-download-page-for-linstor-and-drbd-linux-driver/

https://launchpad.net/~linbit/+archive/ubuntu/linbit-drbd9-stack

guides

https://www.linbit.com/drbd-user-guide/drbd-guide-9_0-en/

https://www.linbit.com/drbd-user-guide/linstor-guide-1_0-en/


HOME | GUIDES | BENCHMARKS | html