I'm planning to use pacemaker with corosync and pcs to provide HA in a active-passive cluster for our two front end servers serving a perl application. I have configured resources for the service IP, Apache the application daemon and what I still need to do - configure replication. That means, I need to configure replication that depending which node is the active one it will sync the whole /opt/application directory to the passive node. How to achieve this is the bast way? Both frontends are ESX VM's.

Thank you!

  • Sync from where? If you mean sync from the other node, this is not a good idea, as it depends on the other node being up. If the other node just dies all of a sudden, then you have no access to the data. – Patrick Mar 30 '18 at 12:26
  • Does it even make sense to sync the application directories of both nodes? – adam86 Mar 30 '18 at 14:12

DRBD should work for this. There are plenty of tutorials out there describing how to configure a Pacemaker, Corosync, and DRBD cluster stack.

DRBD replicates an entire block device, so you'd either add an additional disk to your VMs, cut some extra space out of an LVM volume group for a new LV, or partition your disk.

  • if I will use a new LV do I need to move the /opt/myapp to the new volume group or hos is this supposed to work. I struggle to understand it. – adam86 Mar 31 '18 at 18:52
  • You'd move /opt/myapp/ onto the new DRBD device. You could then use Pacemaker to mount the DRBD device to /opt/myapp. But, you could also mount DRBD anywhere else and use symlinks. Take a look at the DRBD users guide for more general info: docs.linbit.com/docs/users-guide-9.0/#p-work – Matt Kereczman Apr 2 '18 at 2:41
  • @MattKereczman thank you Matt. I will definitely read the user guide! So just to make sure I got it correct. I could also create symlinks from /opt/myapp/ to /myapp/sync that resides on a LV that is the new DRBD device, correct? – yesOrMaybeWhatever Apr 3 '18 at 7:29
  • If you're going to put LVM on top of the DRBD device, yes. I'd recommend LVM under DRBD, and then you'd only want to access the DRBD block device, and not the underlying LVM. – Matt Kereczman Apr 3 '18 at 14:47
  • @MattKereczman ok I got it now. Two last questions. This are ESX Vm's. Is there any other agent than das vmware_fence_soap fencing that can be used for fencing or is it the only option when dealing whith ESX VM? The second question would if it there's any other way than using DRBD? Like rsync resource agent or anything like that ? Could you point me in the right direction please? – yesOrMaybeWhatever Apr 3 '18 at 17:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.