ISPConfig multiserver setup with pacemaker and DRBD for syncing/switching with backup server?

Discussion in 'ISPConfig 3 Priority Support' started by Tomislav Aurednik, Jan 18, 2017.

  1. Tomislav Aurednik

    Tomislav Aurednik Member HowtoForge Supporter

    Is this "ISPConfig multiserver setup with pacemaker and DRBD for syncing/switching with backup server" even possible?
    I want to have 2 servers (server1 and server2) that are running KVM hypervision, each with 4 virtual servers for web&mysql, mail, dns1 and dns2. Every virtual server will have drbd and pacemaker installed to replicate to the node on the other server (server1.web&mysql <-> server2.web&mysql2).
    I know that DRBD needs to have it's own partition that it replicates. So how to install to that partition and what do I have to replicate?
    How to configure ISPCinfig on the second server. Do I set all virtual servers on server2 to mirrors to be mirrors of the virtual servers on server1?
    Or do I have to install a new multiserver setup on the server2 and have it's ovn primary server with the interface?
    Any other thing I shold be aware of?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    So each of the vm has one mirrored counterpart, right? Do you do the drbd replication on the vm level? If yes, then there is no setup in ISPConfig required as ispconfig is not aware and does not has to be aware that you replicate it.

    If you don't do a replication on vm level, then you can find a guide to setup an ispconfig mirror in the ispconfig manual.
     
    Tomislav Aurednik likes this.
  3. Tomislav Aurednik

    Tomislav Aurednik Member HowtoForge Supporter

    Thanks for the reply!
    I wan to do the replication on the vm level. Every vm will have a drbd partition and that will replicate to the coresponding node. But for every server I have to put the files that will replicate to that partition. I'm in contact with Linbit and they told me that for the DB I need only store the DB files on the drbd partition and replicate it. But won't that overrite the needed dbisconfig table on the node server?
    Can I have the ispconfig interface on the primary server and on his node, that when pacemaker switches the server, it has a usable interface?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    If you replicate on the vm level, then the software inside the vm is not aware of the replication and it has not to be aware of that as the hypervisor takes care on replicating everything. The answer that you posted from linbit is not about a vm level replication, so there might be some misunderstanding here. When they speak about different services like mysql, then the vm is not replicated, instead you just have a shared hard drive that is shared between several servers like an NFS drive.

    So if you just have a shared network drive within your vm, then you have to replicate all services as described in the mirror tutorial of the ispconfig manual. If you look at that tutorial, you can see that the ispconfig databases on both nodes have different names, dbispconfig1 on the first server and dbispconfig2 on the second server, so they do not get overwritten. So in your setup you replace the mysql replication with a drbd setup. Then you will have to mount /var/www onto the drbd drive so that the website files are shared between the servers if you don't want to use unison for that.
     
  5. Tomislav Aurednik

    Tomislav Aurednik Member HowtoForge Supporter

    Thanks again. No there is no shared NFS drive. Both vm have drbd and pacemaker installed, and each server a drbd partition that is replicated. The shared hard drive is no option while using LVM partitons because they'll overrite the data.
    Didn't think of using different names for the db tabel.... thanks for this.

    I'll try to use a combination of this tutorials with your howto for multiserver setup.
    https://www.globo.tech/learning-center/setup-drbd-9-ubuntu-16/
    http://stackoverflow.com/questions/1795176/how-to-change-mysql-data-directory
    http://wiki.clusterlabs.org/wiki/DRBD_MySQL_HowTo

    But I just needed to know that it's possible and thank you for that! But if you have any pointers that I have to be aware, they would be appreciated!
     
  6. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    I would not use drbd for database and mail-replication if you need just two servers for each service. I would use mysql master-master and dovecot's dsync. You can find my tutorial in the ispconfig manual.
    I stopped using drbd a few years ago and switched to rsync for websites. But maybe drbd is working better nowadays.
     

Share This Page