--- Begin Message ---

I am about to complete my internship at Evolix, during which I worked on a project to integrate DRBD into Proxmox. This involved manipulating DRBD resources and using basic drbd-utils tools. I have now completed the project and uploaded it to Gitea. I am wondering if there is any interest in sharing this with the community.

Here are the repository links:

 * https://gitea.evolix.org/evolix/pve-drbd (new package)
 * https://gitea.evolix.org/evolix/pve-manager/src/branch/evolix-drbd
   (fork of pve-manager)
 * https://gitea.evolix.org/evolix/pve-docs/src/branch/debian (fork of
   pve-docs)
 * https://gitea.evolix.org/evolix/pve-storage (fork of pve-storage)

I am still working on the repositories (particularly to implement gitbuildpackage).

I am including a part of the README below for you to review if you have time:


1. Introduction
Objective

This documentation aims to detail the modifications made to the Proxmox source code for integrating DRBD. It provides information on the modifications of existing packages as well as the creation of the new pve-drbd package.
Background

The DRBD (Distributed Replicated Block Device) module has been integrated into Proxmox to enhance resource and disk management for VMs. This integration allows the manipulation of DRBD files and resources through the Proxmox VE UI, facilitating the deployment of VMs on DRBD devices.
Compatibility

This patch is compatible with both drbd8 and drbd9. Therefore, the kernel module must be available, as well as the drbd-utils package (>= 9.22). You can find an installation guide for drbd9 on the Evolix Wiki.
2. Overview of Modifications
Summary

The modifications include updating the existing pve-manager, pve-storage, and pve-docs packages, and creating a new pve-drbd package.

You can find the list of packages in the official Proxmox git: Proxmox Git.
Modified Packages

    pve-manager: Management of Proxmox functions and user interfaces.
        Complete user interface with EXTJS (JavaScript)
        Base API calls (Perl), redirecting to the target packages.
    pve-storage: Management of storage functionalities.
        Definition and operation of 'storages' (for VM disk creation)
    pve-docs: Updating documentation to reflect new features.
        Documentation available with the API, and auto-generated for the CLI (man pve-drbd)
    pve-drbd: New package to integrate DRBD with Proxmox.
        Management of API calls related to DRBD
        CLI pve-drbd

3. Features
Integration of DRBD Storage Type for Proxmox VMs

We have added support for DRBD storage type, allowing seamless integration of DRBD usage for virtual machines on Proxmox. DRBD is a kernel-level block replication solution that ensures high availability and data resilience by replicating data in real-time between cluster nodes.
Simplified Management of DRBD Resources via Proxmox UI

The management of DRBD resources is fully integrated into the Proxmox user interface, facilitating the creation, modification, and management of DRBD resources. This integration allows administrators to link DRBD disks to VMs directly from the UI, providing a consistent and simplified user experience. Users can quickly configure and manage their replicated storage environments intuitively.
Command Line Interface (CLI) pve-drbd

In addition to the graphical interface, a dedicated CLI is also implemented for advanced management of DRBD resources across nodes. The pve-drbd CLI allows administrators to execute commands to create, delete, modify, and monitor DRBD resources across all cluster nodes, offering maximum flexibility for advanced users and automation scripts. This CLI is particularly useful for repetitive tasks and large-scale deployments where quick and efficient management is essential.
Custom Features

    Hot migration of VMs based on DRBD is also integrated. It automatically adds the target node to the resources linked to a VM and transfers it using qm.     For drbd8, the DRBD dance is implemented. It allows transferring a VM to another pair of nodes, replacing the old hosts with the newly chosen ones in the resources.

4. Installation Instructions

    Download the git proxmoxDRBD Git.
    Download the source packages (pve-manager, pve-storage, pve-docs, and pve-drbd) into packages (skip this step if you downloaded the git with submodules).     Compile and install pve-docs, pve-drbd, pve-storage, and then pve-manager (in the given order). Dependencies will be required.

5. Detailed Description of Modifications and Functionality
pve-manager

The pve-manager package consists of two parts:
Interface:
Modifications:

    Utils.js: Added the button for creating DRBD storage and defining its type (Datacenter -> storage -> add) as well as task messages.     storage/DRBDEdit.js: Storage creation window with its attributes (linked resource, etc.)     NOTE: The API URL for storage creation is not explicitly written. The DRBDInputPanel inherits from PVE.panel.StorageBase, which calls the API by sending the type (here drbd), redirecting the calls to the pve-storage package (see pve-storage functionality).     dc/DRBD*.js: All windows for DRBD (management of files, resources, etc.)
    dc/Config.js: Added the windows in the dropdown menu.

API Calls:

Modifications:

    API2.pm: Added redirection to the API2/Drbd.pm file for api2/json/drbd API calls.     API2/Drbd.pm: Redirects all DRBD requests to the appropriate Perl modules, along with some utility calls.

pve-storage

Modifications:

    Storage/DRBDPlugin.pm: New file adding support for DRBD storage.
    Storage.pm: Added DRBD storage type in the central management of storage types.

pve-docs

Modifications:

    pvedrbd.adoc: Added documentation related to DRBD, accessible from the Proxmox UI.

pve-drbd

Functionality:

    New package for specific DRBD management. The package contains all API calls and functions to manage resources, files, and utilities for DRBD integration.

Main Files:

    PVE/CLI/pve-drbd: CLI for DRBD management. Each command makes an API call, processes the response (e.g., formatting it), and writes it to standard output.
    PVE/DRBD/: Contains all necessary functions for task execution.
    PVE/API2/: Contains all methods for API calls.

On 8/19/24 08:37, Roland Kammerer via pve-devel wrote:
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

--
Samuel Janssens<sjanss...@evolix.fr>  - SysAdmin support Evolix
Evolix - Hébergement et Infogérance Open Source
Marseille (37 rue Guibal, Pôle Média, 13003) / Paris / Montréal
http://evolix.com  | Twitter: @Evolix @EvolixNOC |http://blog.evolix.com

--- End Message ---
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to