drbd and lvm

RobFantini

Famous Member
May 24, 2012
2,023
107
133
Boston,Mass
Hello

We're going to have a 3 node cluster, with 2 nodes using drbd. I'm following http://pve.proxmox.com/wiki/DRBD and also getting info from http://www.drbd.org/users-guide/s-nested-lvm.html .

We are using /dev/sda6 and /dev/sda7 for the two drbd resources. /dev/sda5 is used for local pve storage .


Two questions:

1- Should we run pvcreate on /dev/sda6 and /dev/sda7 ? Or just only on /dev/drbd0 and /dev/drbd1 ?


2- after reading http://www.drbd.org/users-guide/s-nested-lvm.html , I did this in /etc/lvm/lvm.conf . Does it look OK?
Code:
filter = ["a|sd.*|", "a|drbd.*|", "r|.*|"]

write_cache_state = 0
 
Hello

We're going to have a 3 node cluster, with 2 nodes using drbd. I'm following http://pve.proxmox.com/wiki/DRBD and also getting info from http://www.drbd.org/users-guide/s-nested-lvm.html .

We are using /dev/sda6 and /dev/sda7 for the two drbd resources. /dev/sda5 is used for local pve storage .


Two questions:

1- Should we run pvcreate on /dev/sda6 and /dev/sda7 ? Or just only on /dev/drbd0 and /dev/drbd1 ?


2- after reading http://www.drbd.org/users-guide/s-nested-lvm.html , I did this in /etc/lvm/lvm.conf . Does it look OK?
Code:
filter = ["a|sd.*|", "a|drbd.*|", "r|.*|"]

write_cache_state = 0
Hi,
don't understand your approach about nested lvm?! Normaly, and I guess in you will do it also, you build your drbd-volume on top of an harddisk (partition) and not on an lvm-storage.
I have some pve-drbd-nodes running (with good experiences) without write_cache_state = 0.

Your filter-rule should look like
Code:
filter = [ "r|/dev/sda6|", "r|/dev/sda7|", "r|/dev/disk/|", "r|/dev/block/|", "a/.*/" ]
If you want to easily expand your drbd-volumes later, perhaps you should use single raid-volumes for that (so you can increase the space with the raidcontroller firmware).

Udo

PS: pvcreate only on /dev/drbd[0-1]
 
Last edited:
OK I'll switch to using a regular linux partition for DRBD and not 8e . That is a lot simpler.

The drbd page on wiki has a reference to using 8e . Or maybe I mis read it.

thanks for the response.
 
AFAIK this is only as reminder - that you use that partition as lvm (on top of DRBD).

... I have some pve-drbd-nodes running (with good experiences) without write_cache_state = 0.

Hi udo (the master of the masters)

Please let me to do a question:
AFAIK if lvm is on top of drbd, then lvm will make write cache and the data will not arrive to drbd partition, then the data will not will be replicated to other Node.

Can you tell me why do you suggest disable cache write in lvm?

Best regards
Cesar
 
Last edited:

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!