Introduction
This page describes the installation of testaroli and pestaroli for a test of one-legged DRBD devices on Debian 12.
Procedure
- Make note of the following volume creation commands:
create-perfect-drbd-vol -v --remote=torchio --name=testaroli --size=21G \ --name1=fiori --ip1=192.168.3.6 --name2=torchio --ip2=192.168.3.7 create-perfect-drbd-vol -v --remote=torchio --name=pestaroli --size=21G \ --name1=fiori --ip1=192.168.3.6 --name2=torchio --ip2=192.168.3.7 create-perfect-drbd-vol -v --remote=torchio --name=testaroli_vms --size=60G \ --name1=fiori --ip1=192.168.3.6 --name2=torchio --ip2=192.168.3.7 create-perfect-drbd-vol -v --remote=torchio --name=pestaroli_vms --size=60G \ --name1=fiori --ip1=192.168.3.6 --name2=torchio --ip2=192.168.3.7
and the following container creation commands:
create-perfect-kvm-vm --remote=torchio --name=testaroli \ --release=bookworm \ --mem=4G \ --cpus=1 \ --disk=block:/dev/drbd_testaroli \ --disk=block:/dev/drbd_testaroli_vms \ --nic=bridge:br0 \ --nic=bridge:br1 create-perfect-kvm-vm --remote=torchio --name=pestaroli \ --release=bookworm \ --mem=4G \ --cpus=1 \ --disk=block:/dev/drbd_pestaroli \ --disk=block:/dev/drbd_pestaroli_vms \ --nic=bridge:br0 \ --nic=bridge:br1
(As a reminder, br1 on torchio and fiori are on their replication network, but that network can also be used for testaroli and pestaroli!)
- Complete Installing Debian 12 on a PM or KVM VM.
- Complete Configuring virtualisation services (revision 5).
Journal
- Allocate the second disk to vg1 for DRBD devices for VMs:
pvcreate /dev/vdb vgcreate vg1 /dev/vdb
- Make a DNS entry for a new container ‘condo’.
- Create the one-legged DRBD device as follows (note the omission of
--remote=<host>
option):create-perfect-drbd-vol -v --vg=vg1 --name=condo --size=5G \ --name1=testaroli --ip1=192.168.3.31 --name2=pestaroli --ip2=192.168.3.32
and note the status of the resulting DRBD device:
testaroli# drbd-overview connection:Connecting: StandAlone Primary/Unknown UpToDate/Unknown NotEstablished testaroli#
- Now create a container (again, note the omission of
--remote=<host>
option):create-basic-lxc-cnt --name=condo \ --offset=100000 \ --mem=1G \ --disk=block:/dev/drbd_condo \ --nic=bridge:br0 \ --release=bookworm
- Start the container (e.g. via virt-manager GUI).
- Complete Installing Debian 12 on an LXC container with the default hardware.
- Now add the second DRBD leg by copying over from testaroli to pestaroli /tmp/create-perfect-drbd-vol.<pid>.sh and running it on pestaroli:
testaroli# cd /tmp testaroli# ls -lrt ... testaroli# scp create-perfect-drbd-vol.5294.sh pestaroli: create-perfect-drbd-vol.5294.sh 100% 721 653.1KB/s 00:00 testaroli# ssh pestaroli pestaroli# chmod 755 create-perfect-drbd-vol.5294.sh pestaroli# ./create-perfect-drbd-vol.5294.sh pestaroli# exit logout Connection to pestaroli closed. testaroli#
and note the status of the resulting DRBD device:
testaroli# drbd-overview drbd_condo: Connected Primary/Secondary UpToDate/Inconsistent SyncSource(0.08%/0:59:31) testaroli#
- Copy over the container definition, which I don’t reproduce here as, when I migrate fiori and torchio, I’ll be copying over definitions of existing VMs, not new ones.
See also