The module is actively developed. It might significantly change in the future.
The module is guaranteed to work only in the following cases:
- if stock kernels shipped with the supported distributions are used;
- if a 10 Gbps network is used.
As for any other configurations, the module may work, but its smooth operation is not guaranteed.
sds-drbd module is enabled in the Deckhouse configuration, your cluster will be automatically configured to use the
LINSTOR backend. All that remains is to create the storage pools and StorageClass according to the instructions below.
Configuring the LINSTOR backend
sds-drbd-controller handles the configuration of
LINSTOR storage. For this,
DRBDStorageClass custom resources are created. The
LVM Volume Group and
LVM Thin pool configured on the cluster nodes are required to create a
Storage Pool. The sds-node-configurator module handles the configuration of
Caution! The user may not configure the
Setting up LVM
Configuration examples can be found in the sds-node-configurator module documentation. The configuration will result in LVMVolumeGroup resources to be created in the cluster (the latter are required for further configuration).
To create a
Storage Poolon specific nodes in
LINSTOR, the user has to create a DRBDStoragePool resource and fill in the
specfield, specifying the pool type as well as the LVMVolumeGroup resources used.
An example of a resource for classic LVM volumes (Thick):
- name: lvg-1
- name: lvg-2
- An example of a resource for classic Thin LVM volumes:
- name: lvg-3
- name: lvg-4
LVMVolumeGroupresources in the
DRBDStoragePoolresource must reside on different nodes. (You may not refer to multiple
LVMVolumeGroupresources located on the same node).
sds-drbd-controller will then process the
DRBDStoragePool resource defined by the user and create the corresponding
Storage Pool in the
The name of the
Storage Poolbeing created will match the name of the created
Storage Poolwill be created on the nodes defined in the LVMVolumeGroup resources.
Information about the controller’s progress and results is available in the
status field of the created
Before working with
LINSTOR, the controller will validate the provided configuration. If an error is detected, it will report the cause of the error.
Storage Poolswill not be created in
You can add new
LVMVolumeGroups to the
spec.lvmVolumeGroups list (effectively adding new nodes to the Storage Pool).
sds-drbd-controller will then validate the new configuration. If it is valid, the controller will update the
Storage Pool in the
Linstor backend. The results of this operation will also be reflected in the
status field of the
Note that the
spec.typefield of the
DRBDStoragePoolresource is immutable.
The controller does not respond to changes made by the user in the
statusfield of the resource.
sds-drbd-controller does not handle the deletion of
DRBDStoragePool resources in any way.
Deleting a resource does not affect the
Storage Poolcreated for it in the
Linstorbackend. If the user recreates the deleted resource with the same name and configuration, the controller will detect that the corresponding
Storage Poolsare already created, so no changes will be made. The
status.phasefield of the created resource will be set to
To create a
Kubernetes, you have to create a DRBDStorageClass resource and fill in the
specfield with the required parameters. (Note that you cannot manually create a StorageClass for the drbd.csi.storage.deckhouse.io CSI driver).
Below is an example of a resource for creating a
StorageClassbased on local volumes only (i.e., no data can be accessed over the network) and with a high data redundancy in a cluster consisting of three zones:
replication parameter is omitted since it is set to
ConsistencyAndAvailability by default, which is consistent with high redundancy requirements.
- Below is an example of a resource for creating a
StorageClasswith allowed access to data over the network and no redundancy in a cluster where there are no zones (e.g., it is a good fit for testing environments):
- More examples with different usage scenarios and layouts can be found here
Before creating the
StorageClass, the configuration user provides will be validated. If errors are found, the
StorageClasswill not be created, and the information about the error will be saved to the
statusfield of the
sds-drbd-controller will then analyze the user’s
DRBDStorageClass resource and create the corresponding
Storage Class in
Please note that all fields of
specsection of the
DRBDStorageClassresource are immutable except for the
sds-drbd-controller will automatically keep the
status field up to date to reflect the results of the ongoing operations.
sds-drbd-controller only supports changing the
isDefault field. It is not possible to change other configuration parameters of the
StorageClass created via the
You can delete the
Kubernetes by removing its
sds-drbd-controller will detect that the resource has been deleted and carry out all necessary operations to properly delete its associated
sds-drbd-controllerwill only delete the
StorageClassassociated with the resource if the
status.phasefield of the
DRBDStorageClassresource is set to
Created. Otherwise, the controller will only delete the
DRBDStorageClassresource while its associated
StorageClasswill not be affected.
Additional features for applications
Hosting an application “closer” to the data (data locality)
In a hyperconverged infrastructure, you may want your pods to run on the same nodes as their data volumes, as this will help maximize storage performance.
The module provides a custom scheduler for such tasks. It takes into account where exactly the data is stored and tries to schedule pods first on those nodes where the data is available locally. Any pod that uses sds-drbd volumes will be automatically configured to use this scheduler.
Data locality is determined by the
volumeAccess parameter when the
DRBDStorageClass resource is being created.