Is possible have mdadm, lvm2 and drbd

cesarpk

Well-Known Member
Mar 31, 2012
770
3
58
Hi to all

can anybody help me?

I want to have mdadm RAID1, lvm2 and drbd on my PVEs.

I have practice with mdadm RAID1, too with drbd.

Tutorials:
DRBD : http://pve.proxmox.com/wiki/DRBD
mdadm : http://www.howtoforge.com/proxmox-2-with-software-raid

But i don't know how unite these technologies? - My problem is with lvm.

I tried mdadm on top of DRBD, and DRBD on top of lvm2, after, I create the Physical Volume, after, I create a Volume Group, but with this configuration don't see the replica of Volumen group on the other node

I will be very grateful to anyone who can help me.

Cesar
 
Last edited:
I´ve done it this way - though i´m now using HW-Raid and shared, redundant storage:
mdadm raid1 between sda2 & sdb2 as md1
drbd between both nodes` md1 as drbd0
lvm on top of drbd0
 
I´ve done it this way - though i´m now using HW-Raid and shared, redundant storage:
mdadm raid1 between sda2 & sdb2 as md1
drbd between both nodes` md1 as drbd0
lvm on top of drbd0

Hello Nascire

Thanks for your answer, but can you explain how you did it step by step?

I have only 2 hard drives per node (sda and sdb), PVE are on md0 (boot) and md1 (pve volume group). and md2 will be where will run the VMs with DRBD, then I only need to know how to do it on md2

My PVE Nodes work well, but my problem is for configure md2 with DRBD and lvm.

I will be grateful if you can help me

Best regards
Cesar
 
Hi,

just like described on this link, but specify md2 as backend as below in my quote:
http://pve.proxmox.com/wiki/DRBD#Prepare_drbd_configuration
on proxmox-105 { device /dev/drbd0; disk /dev/md2; address 10.0.7.105:7788; meta-disk internal; } on proxmox-106 { device /dev/drbd0; disk /dev/md2; address 10.0.7.106:7788; meta-disk internal; }

Then just use /dev/drbd0 as PV for lvm (pvcreate /dev/drbd0), create a lvm volume group, and add it through proxmox webinterface.
 
Hi,

just like described on this link, but specify md2 as backend as below in my quote:
http://pve.proxmox.com/wiki/DRBD#Prepare_drbd_configuration


Then just use /dev/drbd0 as PV for lvm (pvcreate /dev/drbd0), create a lvm volume group, and add it through proxmox webinterface.

Hi Nascire

I did as you describe.

When I use pvcreate /dev/drbd0, this physical volume is seen in the other PVE node (pvscan is ok for both nodes), but...
When I create the lvm volume group on drbd0 (vgcreate drbdvg0 /dev/drbd0), this volume group is seen only on the first node and I can not see it in the second PVE node, vgscan or vgdisplay don't show this volume group on the second PVE node!!!.

Any idea please?

Best regards
Cesar