public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: sjanssens via pve-devel <pve-devel@lists.proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: sjanssens <sjanssens@evolix.fr>
Subject: Re: [pve-devel] DRBD integration but without LINSTOR
Date: Mon, 19 Aug 2024 15:37:43 +0200	[thread overview]
Message-ID: <mailman.307.1724074682.302.pve-devel@lists.proxmox.com> (raw)
In-Reply-To: <mailman.301.1724049474.302.pve-devel@lists.proxmox.com>

[-- Attachment #1: Type: message/rfc822, Size: 10051 bytes --]

From: sjanssens <sjanssens@evolix.fr>
To: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] DRBD integration but without LINSTOR
Date: Mon, 19 Aug 2024 15:37:43 +0200
Message-ID: <6b8329fd-1fd3-409a-aeb6-7d341dc0ee5d@evolix.fr>


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<sjanssens@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

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

  reply	other threads:[~2024-08-19 13:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-16  9:17 [pve-devel] Post mail to the list sjanssens via pve-devel
2024-08-16 14:43 ` Dietmar Maurer
2024-08-19  6:37   ` [pve-devel] DRBD integration but without LINSTOR Roland Kammerer via pve-devel
2024-08-19 13:37     ` sjanssens via pve-devel [this message]
2024-08-20  6:43       ` Roland Kammerer via pve-devel
2024-08-27 12:45         ` sjanssens via pve-devel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mailman.307.1724074682.302.pve-devel@lists.proxmox.com \
    --to=pve-devel@lists.proxmox.com \
    --cc=sjanssens@evolix.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal