Deploying LINSTOR storage for Proxmox

kvaps
kvaps
Sep 12, 2018 · 5 min read

Few time ago LINBIT released their new solution LINSTOR which is providing orchestration tool for manage multiple DRBD-arrays.

For example you can have few nodes, each one will have own LVM or ZFS pool, LINSTOR will automatically create new volumes there and replicate or distribute them using DRBD protocol.

LINSTOR supports thin-provisioning, snapshots and many other interesting things.

This solution is good suitable for virtual machines and containers.


LINSTOR Satellites

Presume you already have Proxmox cluster, I have three nodes , and .

So first step is install drbd-utils and build kernel module on every node.

Add linstor repo and install kernel-headers all needed packages from it:

After installing, let’s check your kernel module version:

If you see 8 version, then something has going wrong and you’ve loaded in-tree kernel module, check for more detail about dkms module building. For linstor you should use 9 version of drbd.

On every node install linstor-proxmox and linstor-satellite packages:

LINSTOR Controller

We will deploy controller using LXC-container.

Download debian template:

Create controller container:

Run container, and exec into it:

Install updates

Add linstor repo and install linstor-controller and linstor-client:

Linstor requires configured locale. Configure locale:

let’s configure timezone also:

Preparing storage configuration

Create nodes

For every node we will describe second interface which is dedicated for drbd replication:

Example output of command:

Create pools:

On every node you should prepare lvm thinpool for drbd:

Then you can add them into linstor:

Configure pools to use interface:

Example output of command:

Now we can add our new storage into proxmox’s storage config:

Configuring HA for the controller

Now we will move our linstor container to the linstor storage.

First we will prepare virtual drive for it:

Example output:

By default linstor-satellite will remove configuration for all resources during service restart, then it will wait for new configuration from linstor-controller, but if we have linstor-controller on the same place than data, we should add it’s resource to preserve with option, on all linstor-satellites:

This action should prevent removing resource during service restart.

Now we will shutdown linstor-controller container and move all data from local drive to drbd drive:

Update container config:

Start container and if everything ok, remove old local drive:

Now we only need to add our container to the proxmox ha-manager:

PROFIT

Perfomance and tuning

Currently you have to disable user security (as there is currently no way to authenticate) for global controller options, see:

For automatic split-bran resolution add theese options to the controller:

For my 10G network I found the next values is most optimal for fast sync: