A set of patches has been proposed for the Linux kernel that implements the distributed replicated block device DRBD 9, allowing for the creation of a RAID-1-like array formed from network-mirrored storage devices connected to different systems. The driver is intended to be initially tested in the linux-next branch and brought to readiness for integration into the Linux kernel 7.2.
The old version of DRBD has been included in the kernel since version 2.6.33, released 16 years ago. The existing kernel code is based on the DRBD 8 branch, which is significantly different from the DRBD 9 branch released in 2015 and is not compatible at the protocol level. As a result, the DRBD 9 branch was developed as a separate external module, unsynchronized with the module from the main kernel. The implementation of DRBD in the kernel has lagged by 10-15 years behind the current codebase of DRBD. The proposed patches are designed to eliminate this gap.
DRBD allows for the integration of cluster node storage into a single fault-tolerant storage system. For applications and the system, this storage appears as a uniform block device for all systems. When using DRBD, all operations on the local disk are sent to other nodes and synchronized with the disks of other machines. In the event of one node failing, the storage will automatically continue to operate using the remaining nodes. When the failed node becomes available again, its state will be automatically updated to the current version.
The cluster forming the storage can consist of up to 32 nodes, located both in a local network and in geographically dispersed data centers. Synchronization in such distributed storage systems is performed in a mesh network format — data flows from node to node. Node replication can occur in either synchronous or asynchronous mode. For example, locally located nodes can use synchronous replication, while nodes at remote sites may utilize asynchronous replication with additional traffic compression and encryption.
The DRBD 9 branch features abstraction of the transport layer, enabling communication channels not only over TCP/IP but also using RDMA/Infiniband. Compared to operating over a traditional IP network, the integration of direct memory access to another computer's RAM using RDMA (Remote Direct Memory Access) has doubled the replication performance while reducing CPU load by 50%. The maximum size of synchronized storage has increased to 32 nodes. In DRBD 9, the logic for node resynchronization has also been changed, the locking mechanism has been redesigned, support for network namespace has been added, automatic node status setting according to activity has been ensured, support for two-phase commits and non-blocking update propagation has been added. 
Source: opennet.ru
