• Stars
    star
    542
  • Rank 80,114 (Top 2 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created almost 7 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

LINBIT DRBD kernel module

DRBD

DRBD, developed by LINBIT, provides networked RAID 1 functionality for GNU/Linux. It is designed for high availability clusters and software defined storage. DRBD keeps disks on multiple nodes synchronized using TCP/IP or RDMA and makes the data available as a block device. This results in RAID 1 but without the use of uncommon hardware such as shared SCSI buses or Fibre Channel.

This repository contains the Linux kernel code for DRBD version 9 and above.

Using DRBD

Please read the user-guide provided at docs.linbit.com.

Support

For further products and professional support, please contact us.

Contributing

Development is coordinated via mailing lists. Currently, we do not intend to use github issue tracking/github PRs.

Style checking

Since the code of this module is intended for the Linux kernel tree, we apply the corresponding code style checks. You should ensure that your contributions pass these checks. This can be easily achieved by installing a pre-commit hook, as follows:

curl -L https://github.com/torvalds/linux/raw/master/scripts/checkpatch.pl | sudo tee /usr/local/bin/checkpatch.pl | wc
sudo chmod +x /usr/local/bin/checkpatch.pl
curl -L https://github.com/torvalds/linux/raw/master/scripts/spelling.txt | sudo tee /usr/local/bin/spelling.txt | wc
sudo echo > /usr/local/bin/const_structs.checkpatch
cp misc/pre-commit .git/hooks/

Building DRBD

Since version 9.0.20, DRBD has been using a kernel backwards compatibility system based on Coccinelle semantic patches. While this has many advantages, it also makes it a little harder for "casual" developers to build DRBD from the git sources. The problem is that we require a very recent version of spatch (at least 1.0.8 at time of writing), and most distributions only have relatively old versions in their repositories.

From git

For users wishing to build DRBD from its git sources, here are a few options:

  1. Use a recent kernel. When building against a recent(ish) upstream kernel, chances are you won't even have to use any of the compat features, which means you won't require compatibility patches and in turn don't need spatch installed.
  2. On Ubuntu 18.04 and newer, use a recent spatch version from the Coccinelle PPA. This provides (at time of writing) version 1.0.8, which is recent enough to build DRBD.
  3. Build and install spatch from source. This will also give you a version that is recent enough to build DRBD.

From a release tarball

For use cases where it is appropriate to just build DRBD from a release tarball, here are some options:

  1. Use a distribution kernel and rely on the shipped "compat patch cache". We pre-generate compatibility patches for a list of commonly used distribution kernels and ship them with every release tarball. If your kernel matches one of those in the cache, you won't need spatch because the cached patch will be applied directly.
  2. For all other kernels, you can use LINBIT's "spatch as a service" online service, which transparently and automatically generates compatibility patches based on your kernels feature set.
  3. If you are using an exotic kernel and you do not have internet access or otherwise can't or don't want to use "spatch as a service", you will have to install a recent version of coccinelle (see above).

For a release tarball, these options should be handled transparently for the user. In other words, if you download a tarball and type "make", it should work in next to all cases.

Provided kernel compatibility / compatibility after a relese

With the usual exceptions compat work is usually done relatively late in the release cycle. When we then provide a new release tarball one can usually expect that this version compiles without compat for the latest Linux upstrem kernel at the time. This is because our code is then in a shape that it does not require any compat for latest upstream. One can also expect that we ship pre-generated compat patches for the distributions (and distribution kernels) we care about. So what are the kernels we care about? These are the kernels and distributions our customers use (at the point writing these lines we build for 140 kernels). These include the usual suspects such as Debian, Ubuntu, RHEL, SLES, Oracle Linux, Xen Server,...

This is the situation when we cut a new release. We do not backport compat to older releases. If you use an "old" tarball (it could even be the latest release from us) and Linux upstream moved forward then you might have to wait for the next release (or do the compat work yourself). Too old compat can also happen when distributions do kernel upgrades (e.g., usually when RHEL updates from one dot release to another like 8.5 to 8.6). If that happens we have to provide new compat for our customers anyways. They then get pre-built kernel modules and we push the code to github. But again, we don't backport that new compat to old releases for FLOSS users.

A word on CentOS Stream: It is not one of the distributions we care about too deeply. You might be lucky because their kernel is reasonably compatible to the RHEL kernel, but as they move faster things break faster. If you look for a distribution that is now what CentOS once was (RHEL kernel compatible), then we have very good experience with AlmaLinux. Rocky Linux should be fine as well.

Releases

Releases generated by git tags on github are snapshots of the git repository at the given time. You most likely do not want to use these. They might lack things such as generated man pages, the configure script, and other generated files. If you want to build from a tarball, use the ones provided by us.

More Repositories

1

linstor-server

High Performance Software-Defined Block Storage for container, cloud and virtualisation. Fully integrated with Docker, Kubernetes, Openstack, Proxmox etc.
Java
819
star
2

virter

Virter is a command line tool for simple creation and cloning of virtual machines based on libvirt
Go
150
star
3

csync2

file synchronization tool using librsync and current state databases
C
135
star
4

drbd-utils

DRBD userspace utilities (for 9.x, 8.4, 8.3)
C
74
star
5

windrbd

DRBD driver for windows
C
49
star
6

drbdtop

CLI management tool for DRBD. Like top, but for DRBD resources.
Go
47
star
7

linbit-documentation

Official DRBD documentation
Makefile
34
star
8

k8s-await-election

Start the main process of a pod only if elected via kubernetes leader election. While this was developed for LINSTOR, it may proof useful for other use cases.
Go
33
star
9

linstor-proxmox

Integration pluging bridging LINSTOR to Proxmox VE
Perl
31
star
10

drbd-reactor

Monitors DRBD resources via plugins.
Rust
25
star
11

linstor-gateway

Manages Highly-Available iSCSI targets, NVMe-oF targets, and NFS exports via LINSTOR
Go
24
star
12

linstor-client

Python client for LINSTOR
Python
22
star
13

drbd-8.4

LINBIT DRBD-8.4 (deprecated; use https://github.com/LINBIT/drbd instead)
C
18
star
14

thin-send-recv

zfs send and zfs recv alike for the LVM thin world
C
18
star
15

linstor-api-py

LINSTOR Python API
Python
15
star
16

drbdmanage

Management system for DRBD9
Python
13
star
17

linstor-flexvolume

Go
12
star
18

linstor-external-provisioner

Go
11
star
19

linstor-docker-volume-go

A Go based version of the LINSTOR Docker volume plugin
Go
8
star
20

openstack-cinder

Openstack Cinder, with DRBD driver included
Python
8
star
21

golinstor

golang bindings for linstor
Go
8
star
22

linstor-ansible

Ansible playbook for quickly deploying a LINSTOR storage cluster
Jinja
8
star
23

drbd-flexvolume

DRBD flexvolume plugin for Kubernetes
Go
8
star
24

addon-linstor

OpenNebula driver to manage and access storage managed by LINSTOR
Python
7
star
25

drbd-flex-provision

Kubernetes External Provisioner for DRBD
Go
7
star
26

linstor-common

Code shared between Linstor client and Linstor server
Python
7
star
27

drbdmanage-proxmox

Integration pluging bridging DRBD Manage to Proxmox VE
Perl
6
star
28

drbdmanage-docker-volume

Docker volume plugin to manage DRBD SDS volumes through docker
Python
6
star
29

linstor-operator-builder

Builds the linstor-operator from the piraeus-operator
Smarty
5
star
30

gosshclient

A higher level ssh client in Go that allows for interactive ssh sessions and executing scripts. This started in virter, but is a useful package on its own
Go
5
star
31

cloud-init-for-windows

A minimal version of cloud-init for windows
Shell
5
star
32

saas

Spatch As A Service
Go
4
star
33

lbtest

Execute tests efficiently and concurrently in many VMs
Shell
3
star
34

generate-cat-file

C
3
star
35

libdrbd-perl

A perl library that allows interaction with DRBD resources and their objects (volumes, connections, options). It allows for resource file generation and provides wrappers around low level DRBD commands (drbdadm, drbdsetup, drbdmeta).
Perl
3
star
36

vmshed

shedules tests with virter
Go
2
star
37

linstor-docker-volume

Docker volume plugin for LINSTOR
Python
2
star
38

containerapi

Go bindings to manage containers in a runtime agnostic way (Docker, podman)
Go
2
star
39

gocorosync

Go bindings to interact with Corosync
Go
2
star
40

linstor-wait-until

Go
2
star
41

drbd-headers

DRBD headers used by userspace utils and all kernel components
C
2
star
42

drbd-8.3

LINBIT DRBD-8.3 (historical)
C
2
star
43

drbd-8.0

LINBIT DRBD-8.0 (historical)
C
2
star
44

vagrant-cluster

Vagrant and shell scripts that ease DRBD9/drbdmange testing
Shell
2
star
45

charmed-linstor

Juju charm for deploying LINBIT SDS / Piraeus-Datastore on a Kubernetes cluster
Python
2
star
46

talks

public talks like webinars, conference slides,...
TSQL
2
star
47

linstor-csi-builder

Builds LINBIT's version of the LINSTOR CSI driver
Makefile
2
star
48

dnfjson

A wrapper around libdnf that produces JSON output
Python
1
star
49

prestomanifesto

create multi architecture docker registries
Go
1
star
50

drbd-kernel-compat

DRBD kernel backwards compatibility tests and wrappers
C
1
star
51

wdrbd9

DRBD driver for windows
1
star
52

drbd-0.7

LINBIT DRBD-0.7 (historical)
C
1
star
53

Root-on-DRBD

Example scripts for the Root-on-DRBD TechGuide.
Shell
1
star
54

libtcr

TCR library
C
1
star
55

agentx-rs

RFC conformant AgentX library implementing all PDU types
Rust
1
star
56

bestdrbdmodule

web service to find the best matching kernel module for a RHEL7+ distributions
Go
1
star
57

linstor-api-java

LINSTOR Java API
Java
1
star