HA and DRBD dont synchronizes

  • Thread starter Thread starter ribafs
  • Start date Start date
R

ribafs

Guest
Hi!

Before thanks to the development team provmox ve. Very good virtualization solution.

Hi follow the DRBD Howto to apply HA on two servers.
I connected with a direct crossover cable the eth1 in both.
I create the cluster from both using the eth0.
I fithfully follow the Howto and my configuration is:

interfaces in both server is:
auto lo
iface lo inet loopback

iface eth0 inet manual

auto eth1
iface eth1 inet static
address 10.10.10.30
netmask 255.255.255.0

auto vmbr0
iface vmbr0 inet static
address 192.168.1.30
netmask 255.255.255.0
gateway 192.168.1.1
bridge_ports eth0
bridge_stp off
bridge_fd 0

/etc/drbd.conf
global { usage-count no; }
common { syncer { rate 30M; } }
resource r0 {
protocol C;
startup {
wfc-timeout 15; # wfc-timeout can be dangerous (http://forum.proxmox.com/threads/3465-Is-it-safe-to-use-wfc-timeout-in-DRBD-configuration)
degr-wfc-timeout 60;
become-primary-on both;
}
net {
cram-hmac-alg sha1;
shared-secret "my-secret";
allow-two-primaries;
after-sb-0pri discard-zero-changes;
after-sb-1pri discard-secondary;
after-sb-2pri disconnect;
}
on dnocs3 {
device /dev/drbd0;
disk /dev/sdb1;
address 10.10.10.30:7788;
meta-disk internal;
}
on dnocs4 {
device /dev/drbd0;
disk /dev/sdb1;
address 10.10.10.31:7788;
meta-disk internal;
}
}

See my in master node
cat /proc/drbd
version: 8.3.7 (api:88/proto:86-91)
srcversion: EE47D8BF18AC166BE219757
0: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate C r----
ns:132 nr:525668 dw:525800 dr:3925 al:11 bm:144 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0

In both server the /dev/sdb1 is LVM.

I create the LVM storage and create a VM in this.
In DRBD Howto
"... all the data is already replicated automatically on both nodes..."

apparently everything working but replication dont occurrs.

Please, help me. :(
 
...

See my in master node
cat /proc/drbd
version: 8.3.7 (api:88/proto:86-91)
srcversion: EE47D8BF18AC166BE219757
0: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate C r----
ns:132 nr:525668 dw:525800 dr:3925 al:11 bm:144 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0

In both server the /dev/sdb1 is LVM.

I create the LVM storage and create a VM in this.
In DRBD Howto
"... all the data is already replicated automatically on both nodes..."

apparently everything working but replication dont occurrs.

Please, help me. :(
Hi,
your drbd-output look like that the drbd-syncronisation work.
But you have to use /dev/drbd0 for lvm, not sdb1!
To avoid that sdb1 is used, you must define the filter-statement in lvm.conf.

Please give the output of
Code:
pvdisplay    # after pvscan
vgdisplay 
drbd-overview  # from both nodes

Udo
 
Hi,
your drbd-output look like that the drbd-syncronisation work.

Sorry, I was wrong. Syncronisation really is ok. Not is replicated when I create a VM.

But you have to use /dev/drbd0 for lvm, not sdb1!
To avoid that sdb1 is used, you must define the filter-statement in lvm.conf.

I make this

nano /etc/lvm/lvm.conf
Add this lines
# By default we accept every block device:
filter = [ "r|/dev/sdb1|", "r|/dev/disk/|", "r|/dev/block/|", "a/.*/" ]

pvcreate /dev/drbd0

pvscan

vgcreate drbdvg /dev/drbd0

pvscan

This is ok?
 
Sorry, I was wrong. Syncronisation really is ok. Not is replicated when I create a VM.



I make this

nano /etc/lvm/lvm.conf
Add this lines
# By default we accept every block device:
filter = [ "r|/dev/sdb1|", "r|/dev/disk/|", "r|/dev/block/|", "a/.*/" ]

pvcreate /dev/drbd0

pvscan

vgcreate drbdvg /dev/drbd0

pvscan

This is ok?
Hi,
for filter:
filter = [ "a|drbd.|", "r|/dev/sdb.|"

to look also for drbd-devices and not for sdb* in this case.

What is the output of pvdisplay and vgdisplay (on both nodes)?

BTW.: i prefer two drbd-devices - one for each server to get no big touble if a split-brain situation came.

Udo
 
Sorry, here output:

In both nodes

After I change filter in /etc/lvm/lvm.conf to

filter = [ "a|drbd.|", "r|/dev/sdb.|" ]
And restart lvm ... then


From master node

dnocs3:~# pvscan
PV /dev/sda2 VG pve lvm2 [836,75 GB / 4,00 GB free]
PV /dev/drbd0 VG drbdvg lvm2 [418,61 GB / 313,61 GB free]
Total: 2 [1,23 TB] / in use: 2 [1,23 TB] / in no VG: 0 [0 ]


dnocs3:~# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name pve
PV Size 836,75 GB / not usable 3,84 MB
Allocatable yes
PE Size (KByte) 4096
Total PE 214207
Free PE 1023
Allocated PE 213184
PV UUID S0Wrrc-rVGq-GDeP-tUHb-vcor-g2Vs-PCvoYF

--- Physical volume ---
PV Name /dev/drbd0
VG Name drbdvg
PV Size 418,61 GB / not usable 2,79 MB
Allocatable yes
PE Size (KByte) 4096
Total PE 107164
Free PE 80284
Allocated PE 26880
PV UUID ngYvak-oLTG-bS69-Zxt0-hV6S-gPsA-DVEshj


dnocs3:~# vgdisplay
--- Volume group ---
VG Name pve
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 836,75 GB
PE Size 4,00 MB
Total PE 214207
Alloc PE / Size 213184 / 832,75 GB
Free PE / Size 1023 / 4,00 GB
VG UUID cQA6mp-hLNp-T9NK-yBWa-9hhG-6wGF-oZE1BF

--- Volume group ---
VG Name drbdvg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 10
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 418,61 GB
PE Size 4,00 MB
Total PE 107164
Alloc PE / Size 26880 / 105,00 GB
Free PE / Size 80284 / 313,61 GB
VG UUID a0YXoJ-nO2j-uQg7-K0BC-k1Oy-SUuI-0kw1wN


dnocs3:~# drbd-overview
0:r0 Connected Primary/Primary UpToDate/UpToDate C r---- lvm-pv:
drbdvg 418.61G 105.00G



=========
Output of pvdisplay and vgdisplay From other node:

dnocs4:/etc/qemu-server# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name pve
PV Size 836,75 GB / not usable 3,84 MB
Allocatable yes
PE Size (KByte) 4096
Total PE 214207
Free PE 1023
Allocated PE 213184
PV UUID BLJr68-mRUO-MiOL-UfKR-Yr1x-r199-BdF5Vc

--- Physical volume ---
PV Name /dev/drbd0
VG Name drbdvg
PV Size 418,61 GB / not usable 2,79 MB
Allocatable yes
PE Size (KByte) 4096
Total PE 107164
Free PE 80284
Allocated PE 26880
PV UUID ngYvak-oLTG-bS69-Zxt0-hV6S-gPsA-DVEshj


dnocs4:/etc/qemu-server# vgdisplay
--- Volume group ---
VG Name pve
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 836,75 GB
PE Size 4,00 MB
Total PE 214207
Alloc PE / Size 213184 / 832,75 GB
Free PE / Size 1023 / 4,00 GB
VG UUID EQjjpI-Iab3-ME3O-VffS-dM8m-yXGw-XpUMZP

--- Volume group ---
VG Name drbdvg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 10
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 418,61 GB
PE Size 4,00 MB
Total PE 107164
Alloc PE / Size 26880 / 105,00 GB
Free PE / Size 80284 / 313,61 GB
VG UUID a0YXoJ-nO2j-uQg7-K0BC-k1Oy-SUuI-0kw1wN

 
Last edited by a moderator: