[DRBD-user] Building a VM based HA NFS setup over LVM and DRBD

Felix Frank ff at mpexnet.de
Wed Nov 17 15:40:21 CET 2010

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On 11/17/2010 01:28 PM, Steve in Tokyo wrote:
> 
> Hi All,
> 
> I am new to DRBD and have what is likely a silly question, I hope this is
> the appropriate place to ask and apologize if it isn't.
> 
> I have built a 2 node Proxmox cluster and am using LVM over DRBD, with DRBD
> in dual primary mode. It seems to be running flawlessly and I am very happy.
> I have been able to live migrate an asterisk box while in a conversation
> without even noticing, and now I am hooked.
> 
> I wanted to experiment with High Availability and decided to build an NFS
> setup with heartbeat. I would like to do this with Virtual machines running
> on the Proxmox cluster. Through my experimentation I have found that I can
> mount the LVM volumes as a drive in KVM based VMs (1 NFS server one the
> master and the 2nd on a Node), and have heartbeat automatically fail them
> over. However, the two LVM volumes don't seem to sync up properly. If I copy
> a file to the volume on the master, stop heartbeat, the secondary will
> pickup the IP address, mount the volume, but the newly copied files won't be
> there, even if I wait a minute before performing the failover.
> 
> I am wondering if what I am trying is even possible. As I said I am very new
> to this, and have been reading as much as I can. I am viewing the DRBD setup
> as a physical device, and thought that the writes would be automatically
> replicated. I am wondering if because I am writing to the logical volume
> from the VMs directly if the DRBD aspect is bypassed, or if there is
> something else I am missing (I am sure there is much I am missing). Thanks
> in advance.

Do I understand this correctly: The DRBD device is the PV for your LVM VGs?
Then all writes are indeed replicated.

Make sure the nodes are connected and both in the UpToDate state.

If the DRBD device was created on top of an LV instead, you must never
mount any fs in such an LV directly, much less change files therein.

HTH,
Felix



More information about the drbd-user mailing list