LVM VG on top of DRBD

dfranco

Active Member
Jul 6, 2015
25
2
43
Hello,

We're currently using an old version of ProxMox (version 1.7) and obviously need to upgrade to latest stable version.
The idea for the next cluster would be to use 2 serveurs with DRBD and LVM.

Over the last few days, I've been trying to setup DRBD + LVM on both servers in my virtual environment but I'm stucked when trying to use the VG I've setup from the web UI.
I can only see the default local storage which point to /var/lib/vz

What's wrong ?

Other question ...
If I understood well, i can use this LVM VG for openVZ container(s) or KVM guest(s) right ?
Each KVM guest or openVZ container would have their own LVM logical volume which I could extend, shrink, snapshot, etc ...

Then what would be the procedure if I manually "migrate" a container or a KVM guest from one serveur to another ?

If ProxMox 3.4 reach our expectations, we'd seriously think to get a subscription but, I need a confirmation that this "design" is fully supported and will not impact our production environnement.

Thanks in advance for your feedback

Best regards

Davide
 
if you want to use DRBD, better use 4.0 (currently in beta) with DRBD9.

the current 3.4 with DRBD has some limitations. 4.0 is much better integrated.
 
if you want to use DRBD, better use 4.0 (currently in beta) with DRBD9.

the current 3.4 with DRBD has some limitations. 4.0 is much better integrated.

Hi,

Thanks for your quick reply.

Could you just confirm my thought about LVM with DRBD please ?
Where can I download 4.0beta iso to test it ?
When can we expect a stable 4.0 version ?

Best regards

Davide
 
Hello,

We're currently using an old version of ProxMox (version 1.7) and obviously need to upgrade to latest stable version.
The idea for the next cluster would be to use 2 serveurs with DRBD and LVM.

Over the last few days, I've been trying to setup DRBD + LVM on both servers in my virtual environment but I'm stucked when trying to use the VG I've setup from the web UI.
I can only see the default local storage which point to /var/lib/vz

What's wrong ?
Hi,
please post the command outputs from the node, where you connect to the pve-gui to add the storage:
Code:
drbd-overview
pvs
vgs
grep filter /etc/lvm/lvm.conf
Udo
 
Hi,
please post the command outputs from the node, where you connect to the pve-gui to add the storage:
Code:
drbd-overview
pvs
vgs
grep filter /etc/lvm/lvm.conf
Udo

Hi Udo,

here's the information you requested

On node 1
root@pxmox34-nd1:~# drbd-overview
0:r0 Connected Primary/Primary UpToDate/UpToDate C r----- lvm-pv: drdbvg 13.09g 0g


root@pxmox34-nd1:~# pvs
PV VG Fmt Attr PSize PFree
/dev/drbd0 drdbvg lvm2 a-- 13.09g 13.09g

root@pxmox34-nd1:~# vgs
VG #PV #LV #SN Attr VSize VFree
drdbvg 1 0 0 wz--n- 13.09g 13.09g


filter = [ "r|/dev/vdb1|", "r|/dev/disk/|", "r|/dev/block/|", "a/.*/" ]

On node 2


root@pxmox34-nd2:~# drbd-overview
0:r0 Connected Primary/Primary UpToDate/UpToDate C r----- lvm-pv: drdbvg 13.09g 0g


root@pxmox34-nd2:~# pvs
PV VG Fmt Attr PSize PFree
/dev/drbd0 drdbvg lvm2 a-- 13.09g 13.09g


root@pxmox34-nd2:~# vgs
VG #PV #LV #SN Attr VSize VFree
drdbvg 1 0 0 wz--n- 13.09g 13.09g


filter = [ "r|/dev/vdb1|", "r|/dev/disk/|", "r|/dev/block/|", "a/.*/" ]

Thanks for your help

Davide
 
Hi Davide,
soyrry for delay.

Don't see any reason why you can't add the storage (datacenter -> storage -> add -> lvm -> existing lvm: select here drbdvg).

BTW. it's strongly recommended to use two drbd-ressources - one as main-ressource for each server. Otherwise you will run in trouble if you have an split brain condition.

Udo
 
Hi Davide,
soyrry for delay.

Don't see any reason why you can't add the storage (datacenter -> storage -> add -> lvm -> existing lvm: select here drbdvg).

BTW. it's strongly recommended to use two drbd-ressources - one as main-ressource for each server. Otherwise you will run in trouble if you have an split brain condition.

Udo

Hi Udo,

No worries ...

My problem is that I can add this LVM vg storage in the Web UI, but when I create a new VM/Container, I can't use it in storage, I see only the default one (local).

Thanks for you recommendation about using two DRBD ressource (one for each server).

Best regards

Davide
 
Hi Udo,

No worries ...

My problem is that I can add this LVM vg storage in the Web UI, but when I create a new VM/Container, I can't use it in storage, I see only the default one (local).

Thanks for you recommendation about using two DRBD ressource (one for each server).

Best regards

Davide
Hi,
you must select as content disk-images, select shared + enable and nodes: both drbd-nodes

Udo
 
Hi,
you must select as content disk-images, select shared + enable and nodes: both drbd-nodes

Udo

Hi Udo,

That's exactly what I did ...
I can use the LVM VG but only with KVM guest, why I can't use it with openVZ CT ?

Thanks your help

Davide
 
Hi,
Open VZ container need an filesystem (local, nfs, ...).
lvm hasn't an filesystem... with lvm LVs was providet to VMs, which are blockdevices like an HDD.

Udo

Hi Udo,

ok got it ;)

Thanks a million for your precious help.

Best regards

Davide
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!