Pacemaker and DRBD on Hyper-V

clusterdrbdhyper-vpacemaker

I need to setup two-node Web cluster for Apache web site. I have Hyper-V infrastructure and only two nodes.
The points are load-balancing and high availability.

I installed and configured two VMs with CentOS 7, Pacemaker cluster, MariaDB 10. I configured Master/Slave ocf::percona:mysql resource in Pacemaker.

Next i need a shared storage for web site content.
I created DRBD disk in dual-primary mode and GFS2 in top of it. I tested it without adding to Pacemaker. All worked fine but, to make it automaticaly promoted, i need to manage these via Pacemaker.

The problem is that Pacemaker need fencing to create DRBD resource but there is no stonith agents for Hyper-V.
I read that in previous version for CentOS 6 it was possible to create SSH stonith agent. I tried to do this, but pcs not works with it.

Is it possible to use Pacemaker in top of Hyper-V for now? Or may be exist another way to use DRBD in dual primary?

Best Answer

Is it possible to use Pacemaker in top of Hyper-V for now? Or may be exist another way to use DRBD in dual primary?

It's possible but resulting performance is not going to be great TBH. Get some native Windows solution like StarWind Virtual SAN you can run right on top of Hyper-V. These particular guys are free for two nodes, you may need to ask for "hyper converged" enabled license from them.

https://www.starwindsoftware.com/starwind-virtual-san-free

If you'll decide to stick with DRBD don't do dual primary, stick with active-passive! A/A will not help much to performance but active-passive is much easier to manage and it does not suffer from split brain issues.