Proxmox - Linbit install on an existing Proxmox cluster with LVM Thin already installed. How to install

Hi,

How do you install and use Linstor for Proxmox in this configuration. Installing Linstor into a preexisting Proxmox cluster where storage is based on LVM Thin storage backend and VMs are already in use.

Configuration:

  • A single Proxmox cluster.
  • Proxmox is a three (3) node cluster.
  • Proxmox storage are LVM-Thin volumes.
  • Proxmox VMs are currently installed on only one (1) PVE node.
  • The remaining two (2) PVE nodes in the cluster are not currently in use, but have LVM Thin volumes consuming all of the available space. These were reserved basically to migrate the VMs too and/or replicate to.

Exploring Installation options:
Now we would like to introduce Linstor to provide replication of the existing Proxmox VMs to the other PVE node.

QUESTION #1:
How can we install Linstor to achieve replication of the existing VMs to the other PVE nodes?

All of the tutorials for Proxmox illustrates setting up and configuring Linstor in a new environment with nothing existing before.

In other words, I would like to introduce Linstor into an existing Proxmox cluster where all of the storage have already been defined, based on LVM Thin, in use and without potentially disrupting the current Proxmox VMs configuration setup.

In this case I’d suggest installing LINSTOR onto your cluster nodes, defining the existing LVM thin pools as storage pools in LINSTOR, create your resource group using those storage pools, and defining that resource group to be used in your plugin configuration. At that point, you could migrate the VMs within Proxmox to use the DRBD-backed storage on those cluster nodes.

I’m assuming based on your explanation of your configuration that you have LVM thin pools defined on those two cluster nodes; you would not be able to add the storage to LINSTOR for this purpose if volumes from the thin pools are already created as the pool would be considered to be fully allocated. But in the case of thin pools, you can add your already-created pool into LINSTOR, picking up on the step in the guide (linked here)

linstor storage-pool create lvmthin proxmox-0 pve-storage linstor_vg/thinpool

The thin pool is addressed as <volume group>/<thinpool> here in the example, linstor_vg/thinpool, so you would put your own thin pool name and the volume group it belongs to for that particular cluster node in order to allow LINSTOR to use it.

At that point you would be able to follow the steps in the guide to complete the setup.

When you are ready to migrate your VMs, you would temporarily set exactsize yes in your /etc/pve/storage.cfg for your DRBD storage. After you are done migrating your VMs, remove the exactsize yes option from the storage.cfg configuration file. More information can be found in the user guide here:
https://linbit.com/drbd-user-guide/linstor-guide-1_0-en/#s-linstor-proxmox-migrating-storage

I’ll also note that in the LINSTOR Proxmox guide, the thin pool that is created for the LINSTOR storage pools uses 80 percent of the available space in its volume group. This headroom is intentional to account for the metadata sub-volume in addition to the data volume, as the thin pool stops working if either fills completely, and LVM currently does not support the shrinking of either of these volumes. Since you mentioned the space on your nodes is fully consumed by your thin pools I want to point this out for your consideration in your existing storage topology.