Elastix Software Raid
Word of warning: if you are curious like most, you have probably checked the directory to see if the files created. Note if you have found other services you need heartbeat to stop and start add them above.Still on the Node 1 Server, we are now going to manually bring the server as the secondarycode language=”text”umount /repdatadrbdadm secondary repdata/codeOn the Node 2 Server, we are going to bring it up as the primarycode language=”text”drbdadm primary repdatamount /dev/drbd0 /repdata/codeIf you now check the /repdata directory on the secondary server, you will now see the files are now replicated. So we now need to remove the files from the root directory and provide symlinks. Important: The above line that goes into the haresources file needs to be all on one line when you enter it into your editor (it’s worth extending your SSH terminal so you can see it is on one lineThe IP address in the line above is going to be your Virtual IP address. The names at the end of the line are the services that HA will control e.g. It will turn them on or offNow to start the heartbeat service on the Node 1 Servercode language=”text”service heartbeat start/codeYou might get what appear to be critical errors coming up.
Ignore until after the reboot coming up shortlynow copy the ha config files across to the Node 2 Server with the following commandcode language=”text”scp /etc/ha.d/ha.cf /etc/ha.d/authkeys /etc/ha.d/haresources root@elxnode2.netintegrity.local:/etc/ha.d//codeon the Node 2 Server start the heartbeat service as wellcode language=”text”service heartbeat start/codeNow Reboot both Nodes!!They should come up with Node 1 as the primary and Node 2 as the secondary. You may want to perform a cat /proc/drbd on both servers, and you may find that they are still syncing with all that data that we put onto the DRBD partition. This might take a little while, but once synced, the small changes you make to the configuration should replicate across in seconds.That’s it, you now have your high availability system in operation. One of the main things to remember is that you no longer access the individual Server Node IP addresses to make changes, you perform everything through your Virtual IP address. The only time you should need to access the Node Server IP address is to update your DRBD / HA configuration files or to perform a test or maintenance e.g. You want to shut down Server Node 1 to confirm performs the high availability function.Additional NotesYou have just completed a High Availability implementation of Elastix. Before you put it into operation you need to test it thoroughly.It is also very worthwhile checking other documents on the Internet.
Whilst care is taken with the preparation of this document, it is still possible errors or even omissions may have occurred. Setting your phones to connect to the Virtual IP AddressRemember, everything needs to address or operate via the Virtual IP Address, otherwise your High Availability setup will fail. If the phones are pointing to the IP address of Server Node 1, when Server Node 1 fails, so do your phones.This also means changing the Option 66 in your DHCP if you implemented this.
This should now point to the Virtual IP Address. Checking Heartbeat controlled servicesAs you have seen under the /etc/ha.d/haresources file, there are a number of services which Heartbeat has been assigned to control.
These are currently:mysqld asterisk httpd elastix-portknock elastix-updaterdThese are the basic services that we need heartbeat to control. However you may find that your implementation has other services that need to be stopped depending on what addon’s you have installed. For instance one that is not included above is Openfire. If you have implemented this and it makes connections to other gateways, you probably need to think about including Openfire as one of the services controlled by HeartBeat. There may be others.
Elastix Registration
Not all services need to be controlled by Heartbeat, mainly the ones that may interfere.You can check what Services you currenly have running by running the following commandcode language=”text”chkconfig –list/codewhich will list all the current services whether they are running or not. Thinking about the Endpoint Configurator or Provisioning filesThis is not the only item to think about, but it gives you an idea of where your thinking needs to go.You will note that I included the TFTPBOOT directory and files as part of the replication. This is a good idea, however one of the issues is that configuration files when they are written by the EndPoint Configurator, contain the IP address of the Server that they are created on.
If you understand what I mean, is that the Server Node 1 address is written into the file, not the Virtual IP Address. This is a failing of the Endpoint configurator scripts, but to be fair, these scripts were never meant to consider a high availability capability.So it may be necessary to implement a workaround and edit the main template script that creates these files and hard set an IP address. Not ideal, but necessary if you want your High Availability solution to work successfully.I have successfully made this change and works well, but as I mentioned, this is just one area that needed to be considered.
Geometrically Increase Your IP-PBX Hard-Drive Reliability with RAID1 Support P/N = XR0064The Xorcom, and IP-PBX appliances offer built-in RAID1 support for increased system reliability. RAID is a technology that employs the simultaneous use of two or more hard disk drives to achieve greater levels of reliability, among other benefits.
The reliability provided by RAID is essential to meet the ‘always-on’ requirements of enterprise-grade telephony installations, and complements the robust feature set and ease of installation and maintenance afforded by the Xorcom IP-PBX solutions. RAID1 Support in Xorcom IP-PBXIn the Xorcom implementation of RAID1, two hard disks are supplied. Geometrically increase IP-PBX hard-drive reliability with RAID1 support.
Diagram courtesy of Cburnett from Wikipedia site and used under GFDL license.The diagram at right illustrates RAID1 with the two disks (Disk 0 and Disk 1) over one logical volume, with all blocks replicated/mirrored from Disk 0 to Disk 1. If the active hard disk fails, the second hard-disk automatically takes over and an alarm e-mail is sent to the system administrator. The Xorcom XE2000 IP-PBX or XE3000 IP-PBX unit continues to work seamlessly, and the system administrator can schedule a planned replacement of the faulty disk at a convenient time.