Simple failover cluster using UCARP on Ubuntu (Heartbeat Alternative) Rumi, January 24, 2016 In this tutorial, I’ll show you the steps to create a simple failover cluster on Ubuntu using CARP. To make the things meaningful,we’ll create the cluster for Apache service but you can use it for any other service, which relay on IP. Scenario: Here is my Setup: PrimarySrv: This is the main server, where I configured the apache and which act as Master (IP: 192.168.1.202) SecondarySrv: 2nd Apache Server where I configured the apache exactly like on PrimarySrv (IP : 192.168.1.203) 192.168.1.250 : Virtual IP address,created using Ucarp. Ucarp is really simple, it works like this,when the PrimarySrv is up,it will assign the virtual IP 192.168.1.250 to it, in case that PrimarySrv is down then it will assign virtual IP to the SeconadrySrv and when the PrimarySrv will come online, it will assign the virtual IP once again to it. I assume that you configured Apache server already according to the above scenario, Let’s test it for PrimarySrv: For SecondarySrv: Login to the servers and install Ucarp: sudo apt-get install ucarp Edit the file /etc/network/interfaces on PrimarySrv: sudo vi /etc/network/interfaces Change it according to your scenario: # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.1.202 netmask 255.255.255.0 ####################### # ucarp configuration ####################### # vid : The ID of the virtual server [1-255] ucarp-vid 1 # vip : The virtual address ucarp-vip 192.168.1.250 # password : A password used to encrypt Carp communications ucarp-password secret # advskew : Advertisement skew [1-255] ucarp-advskew 1 # advbase : Interval in seconds that advertisements will occur ucarp-advbase 1 # master : determine if this server is the master ucarp-master yes # The carp network interface, on top of eth0 iface eth0:ucarp inet static address 192.168.1.250 netmask 255.255.255.0 Edit the file /etc/network/interfaces on SecondarySrv: sudo vi /etc/network/interfaces Change it according to your scenario: # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.1.203 netmask 255.255.255.0 ######################### # ucarp configuration ######################### # vid : The ID of the virtual server [1-255] ucarp-vid 1 # vip : The virtual address ucarp-vip 192.168.1.250 # password : A password used to encrypt Carp communications ucarp-password secret # advskew : Advertisement skew [1-255] ucarp-advskew 100 # advbase : Interval in seconds that advertisements will occur ucarp-advbase 1 # master : determine if this server is the master ucarp-master no # The carp network interface, on top of eth0 iface eth0:ucarp inet static address 192.168.1.250 netmask 255.255.255.0 Restart the network service on both servers: sudo /etc/init.d/networking restart Check the IP configuration on both servers,you’ll see that the virtual IP(192.168.1.250) is assigned to the PrimarySrv: ifconfig At this moment, SecondarySrv don’t know about the virtual IP,we can verify it: ifconfig Now we access the apache web page in our web browser: www.apache-cluser.local Note: http://www.apache-cluster.local is equal to 192.168.1.250 Shutdown the PrimarySrv server: sudo poweroff Now,Ucarp assign the virtual IP (192.168.1.250) to the SecondarySrv server, let’s verify it: ifconfig Access the apache web page in web browser once again: www.apache-cluster.local Once the PrimarySrv will be online, it will take the virtual IP back once again. For configuring the synchronization between the servers, please refer this tutorial. Hope this will help you! Src: https://rbgeek.wordpress.com/2012/09/02/simple-failover-cluster-using-ucarp-on-ubuntu/ Related Administrations Configurations (Linux) HeartbeatHighAvailibilityUCARP
Convert VirtualBox VM to ProxMox VE June 24, 2022June 24, 2022 On the VirtualBox host, launch VirtualBox Right click the VM to convert > Settings Select Storage from the left navigation Click the virtual hard disk and copy the Location value for the full path of the disk to the clipboard Right click on the Start menu > Run > type… Read More
Install Mailtrain Bulk Mailer Application on CentOS 7 March 17, 2018March 17, 2018 Requirements Metabase requires at least 1GB of RAM. All the required dependencies will be installed throughout the tutorial. You will need a minimal installation of CentOS 7 with root access on it. If you are logged in as a non-root user, you can run sudo -i to switch to root… Read More
Upgrading WordPress Core Manually April 14, 2022April 14, 2022 First create a full backup of your website. This is very important in case you make a mistake. Download the newest WordPress ZIP file from wordpress.org. Unzip the file into a directory on your local machine or in a separate directory on your website. Deactivate all of the plugins on… Read More