[DRBD-user] DRBD and (C)LVM

Manuel Prinz manuel.prinz at uni-due.de
Tue Nov 2 15:15:52 CET 2010

Hi everyone,

I came to DRBD recently and think about using it in a setup with LVM. I
read a lot on the internet but unfortunately that mostly added to the
confusion, so I hope you can help me out here.

A short introduction: I have two RAID arrays which I'd like to join via
LVM (as PVs) and replicate them via DRBD.

First, I can think of two solutions to that:

     A. Create two DRBD resources on top of the arrays. The DRBD
        resource would be on each of /dev/sd[bc]. The two DRBD resources
        would be used as PV and the VG and LV(s) created on top of that.
        The FS would reside on the LV.
     B. Create one DRBD resouce on top of an LV. Both /dev/sd[bc] would
        be used as PV. A LV would be created, with a DRBD resource on
        top. The FS would reside on the DRBD resource.

I did not find any information about which setup two prefer. My gut
feeling is that option B is easier to manage, but I have no facts on
that. Also, the implications on performance in these setups are unclear
to me. Which one would you recommend? (It should be said that the
solution should be able to grow, but that should not be much of a
problem in both scenarios.)

Second, I have some questions regarding Active/Active setups. I
understand the need of a FS that has support for distributed locking. If
such a setup runs on top of LVM, would I need CLVM or is LVM with
locking_type=3 sufficient? Do I need to pass --clustered=y to vgcreate?
(My understanding is that it only sync LVM setups between cluster nodes,
but that sounds optional in my DRBD setup -- though the machines are

As there should be no problem with concurrent access, is STONITH
required in such a setup? The LinuxTag white paper disables it but does
not give an explanation. I guess it's because of the FS but am not sure.

There's also a lot of FUD on the net regarding GFS2 and OCFS2,
especially in regards to PaceMaker integration. Is GFS2 really better
integrated and more reliable?

Last, I wonder what's the best solution to export the storage to other
nodes. I have bad experiences with NFS, and iSCSI looks like the way to.
With a DLM-aware FS it should be OK to access them from several nodes.
Or is there a better way to export the storage to other nodes?

That's all (for now)! Thanks in advance for reading all this and your
(hopefully upcoming) replies!

Best regards,
Dipl.-Bioinf. (FH) Manuel Prinz, Zentrum für Medizinische Biotechnologie,
Universität Duisburg-Essen, Universitätsstr. 2, 45117 Essen, Germany
phone +49 201 183-2648, manuel.prinz at uni-due.de

More information about the drbd-user mailing list