drbd-user March 2010 archive
Main Archive Page > Month Archives  > drbd-user archives
drbd-user: [DRBD-user] Placing of DRBD on LVM and GFS2 in guests

[DRBD-user] Placing of DRBD on LVM and GFS2 in guests (KVM), need of Heartbeat/OpenAIS/Pacemaker?

From: Timo Schoeler <timo.schoeler_at_nospam>
Date: Tue Mar 09 2010 - 16:03:27 GMT
To: drbd-user@lists.linbit.com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,

I'm just scratching my head about following scenario, and I didn't find
similar setups around the interweb (all the setups out there mention
'the whole stack' from block device/DRBD up to the FS used):

I want to virtualize some machines using KVM on a bunch of machines; in
this example, I have two 'real' machines (dom0 in Xen speak), on each of
them there's a few virtualized hosts. I want to share one directory
(e.g. /data) between two of the virtualized hosts (one on each physical
machine).

The idea was to create a DRBD device on each 'real' machine, on top of
LVM -- so, I mirror a LV ('LV_mirrored') between those two machines.

This LV is used (on each of the machines) as hdc (hda is the system HD,
hdb used for swap, hdc is '/data') in the KVM environment.

Now, I would like to use GFS2 as the cluster FS I need to run anyways:

+-------------------+ +-------------------+
| +-------------+ | | +-------------+ |
| | LV_mirrored |<=|=========== DRBD ==========|=>| LV_mirrored | |
| +-------------+ | (+---------DRBD--------+) | +-------------+ |
| | | (| |) | | |
| KVM | (| |) | KVM |

| | | (| |) | | |
| +-------------+ | (| |) | +-------------+ |
| | virt_A |<=|==+======== GFS2 =======+==|=>| virt_B | |
| +-------------+ | | +-------------+ |
| | | |

+-------------------+ +-------------------+

The idea behind this is that I'd like DRBD to be run on the physical
hosts instead of the virtualized hosts to save some CPU cycles. As GFS2
is needed in the virtualized machines, I'd have to run it there.

As far as I can see, I can run a relatively 'dumb' DRBD setup on the
physical machines, dual-primary. DRBD should take care of split-brain
situations itself. Locking mechanisms should be provided by GFS2 in the
virtualized environments.

Is this setup 'okay' or can it be improved? Is there anything that can
lead to make this setup go south that I didn't see? Or is the best
solution to put 'the whole stack' (from DRBD on an LV *in* the
virtualized host itself as well as GFS2) inside the virtual machines?

Thanks in advance,

Timo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFLlnFPfg746kcGBOwRAuhrAJ93XOEMZTM4AKiaX1BkIdHlDH6GpwCgmi4S
y5e2nd39uMot35qU0o4GKe0=
=Oa35
-----END PGP SIGNATURE-----
_______________________________________________
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user