Configuring Separate Networks for DRBD's Replication When using the LINSTOR Operator v1 for Kubernetes
It’s considered a best practice to use a separate dedicated network for DRBD® replication. This article describes how to do this when using the LINSTOR® Operator (v1.x) to deploy LINSTOR into Kubernetes.
The LINSTOR Operator v1 does not support configuring a separate replication network during its initial deployment of LINSTOR. However, once you’ve deployed LINSTOR, and before you define your LINSTOR storage classes in Kubernetes, you can use the following commands and configurations to separate your replication traffic.
Assume you have three nodes named linbit1
, linbit2
, and linbit3
,
with dedicated network interfaces for DRBD’s replication configured with
the IP addresses, 10.10.10.101
, 10.10.10.102
, and 10.10.10.103
,
respectively. Also assume that you’ve deployed LINSTOR by using the
LINSTOR Operator v1.x into your Kubernetes cluster with the CNI
configured to use some other network.
Start a shell session on the LINSTOR Controller pod and add an
additional interface
to each node
in your LINSTOR cluster. This
example uses the name rep_nic
, but this can be whatever you’d like.
kubectl exec -it deployments/linstor-op-cs-controller -- bash
linstor node interface create linbit1 rep_nic 10.10.10.101
linstor node interface create linbit2 rep_nic 10.10.10.102
linstor node interface create linbit3 rep_nic 10.10.10.103
exit
With the dedicated network interfaces configured in LINSTOR, you can
create the LINSTOR storageClass
definitions with the PrefNic
parameter, instructing LINSTOR to use the dedicated network instead of
the default network.
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: linstor-storage-pool-example
provisioner: linstor.csi.linbit.com
parameters:
... snip ...
property.linstor.csi.linbit.com/PrefNic: rep_nic
Written by MDK on 2/16/2023
Reviewed by DK / MAT on 2/16/2023