0 Items

Document version: 1.0

This document provides instructions for upgrading Xorcom TwinStar CTS2000/3000/4000 Servers running CompletePBX v.4.00.0 to the version 4.5.
Prior to performing the upgrade, it is strongly recommended that you backup your current server using the Xorcom Rapid Recovery tool (http://www.xorcom.com/Rapid-Recovery).

IMPORTANT NOTES!

* The Primary server must be the active server before you start with upgrading. Note: The “Primary” server is the server to which the Astribank USB port marked as “Main” is connected.

* The DRBD partition must be synchronized (“UpToDate”) on both servers before you start the server update. To verify that the DRBD partition is synchronized on both servers, run the following command:

# cat /proc/drbd 

version: 8.4.4 (api:1/proto:86-101)
GIT-hash: 91b4c048c1a0e06777b5f65d312b38d47abaea80 build by ...
0: cs:Connected st:Primary/Secondary ds:UpToDate/UpToDate A r---
ns:56029056 nr:0 dw:47368 dr:58625290 al:112 bm:3598 lo:0 pe:0 ua:0 ap:0 oos:0

* The Schmooze commercial modules are not supported in this version. Most of them have been replaced with modules that have been developed by Xorcom, as detailed in the following table:

CompletePBX v.4.0CompletePBX v.4.5 replacement
System AdminSystem Settings
EndPoint ManagerEndpoint Manager
Extension RoutesRouting Groups
FaxProFaxMaster
Emergency Notificationn/a
Text To Speechn/a

You will be requested to confirm those changes. This will be an opportunity to stop the upgrade process.

Update Procedure

1. On both servers, disconnect DRBD communication:

 drbdadm disconnect r0

2.On the active server, disable the TwinStar watch dog process:

twinstar disable-wd

3. On the primary server, update the software as follows:

cd /tmp
wget http://updates.xorcom.com/servers/tools/cpbx-4-4.5-upgrade.tar.gz
tar xzf cpbx-4-4.5-upgrade.tar.gz
cd cpbx-4-4.5-upgrade
./run-upgrade

You will be prompted for the commercial modules removal.

The amount of time required to complete the upgrade process depends on the available Internet bandwidth. It can be quite lengthy.

The upgrade log is saved in the upgrade.log file.

The run-upgrade script performs the upgrade in several stages. The current stage is saved in the stage file that is created in the same folder where the script is installed.

If the script fails for any reason (e.g., particular YUM repository is temporarily unavailable, etc.) then it is usually safe enough to run the script again. The run-upgrade will resume from the point where it was interrupted.

If the software upgrade has been completed successfully the following message will appear:

*** Upgrade completed successfully.
Reboot the PBX.

4. On the primary server, reboot the server as follows:

reboot

5. On the primary server, it is possible that after reboot the DRBD will not start automatically. In this case the usual information will not display in the /proc/drbd. In order to fix the problem, start the DRBD manually, as follows:

/etc/init.d/drbd start

6. On the primary server, disconnect DRBD communication and disable the TwinStar watch dog process, as follows:

drbdadm disconnect r0
twinstar disable-wd

7. On the primary server, reset the Astribank devices, as follows:

 /etc/init.d/asterisk stop
/etc/init.d/dahdi stop
/usr/share/dahdi/xpp_fxloader reset

Wait until Asterisk and the other services start automatically.

#lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 005: ID e4e4:1162
Bus 001 Device 001: ID e4e4:1162
Bus 003 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000

After a while, depending on the number and type of Astribanks installed, proof that the Asterisk process is running will be displayed:

[[email protected] ~]# ps -A | grep asterisk
7236 ? 00:00:00 safe_asterisk
7246 ? 00:00:01 asterisk

The primary server has been upgraded. Some additional actions must be performed on the server after the backup server is upgraded.

8. In order to upgrade the backup server Asterisk needs to run there. Please note that Asterisk is already running on the primary server. If the PBX is configured to register on a SIP server then both primary and backup servers will try to register on it. If this is the case then stop Asterisk on the primary server using the following command:

/etc/init.d/asterisk stop

9. On both servers, disconnect DRBD communication, as follows:

drbdadm disconnect r0

It is possible that DRBD communication is already disconnected on srv-b. In this case you will get an error message from drbdadm which you can ignore.

10. On the backup server, mount the DRBD partition (/replica):

cd /etc/ha.d/resource.d/
./drbddisk r0 start
./TSFilesystem /dev/drbd0 /replica ext3 start

If this was done properly, the communication status (cs) will be ‘StandAlone‘ and state (ro) will be ‘Primary‘ in output of the ‘cat /proc/drbd‘ command. For example:

cat /proc/drbd
version: 8.4.4 (api:1/proto:86-101)
GIT-hash: 91b4c048c1a0e06777b5f65d312b38d47abaea80 build by ...
0: cs:StandAlone ro:Primary/Unknown ds:UpToDate/DUnknown r----
ns:535648 nr:4368 dw:96868716 dr:577970 al:23 bm:5996 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:888

11. On the backup server, run the mysqld and asterisk services:

rm -f /var/lib/mysql/mysql.sock
/etc/init.d/mysqld start
/etc/init.d/asterisk start

12. On the backup server, upgrade the software, as follows:

cd /tmp
wget http://updates.xorcom.com/servers/tools/cpbx-4-4.5-upgrade.tar.gz
tar xzf cpbx-4-4.5-upgrade.tar.gz
cd cpbx-4-4.5-upgrade
./run-upgrade

You will be prompted for the commercial modules removal.

The amount of time required to complete the upgrade process depends on the available Internet bandwidth. It can be quite lengthy. The upgrade log is saved in the upgrade.log file. If the software upgrade has been completed successfully the following message will appear:

*** Upgrade completed successfully.
Reboot the PBX.

13. On the backup server, reboot:

reboot

14. On the backup server, note that after reboot the DRBD may not start automatically. In this case, the usual information will not appear in the /proc/drbd. In order to fix the problem, start the DRBD manually, as follows:

/etc/init.d/drbd start

15. On the primary server, connect DRBD as follows:

drbdadm connect r0

16. Check the DRBD status on both servers. On the active server something like the following will be displayed:

# cat /proc/drbd
version: 8.4.4 (api:1/proto:86-101)
GIT-hash: 91b4c048c1a0e06777b5f65d312b38d47abaea80 build by ...
0: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent A r----
ns:470064 nr:0 dw:17932 dr:474365 al:28 bm:129 lo:0 pe:4 ua:15 ap:0 ep:1 wo:b oos:291840
[===========>........] sync'ed: 61.9% (291840/761692)K 
finish: 0:00:26 speed: 11,104 (10,212) K/sec

On the backup server the following will display:

# cat /proc/drbd
version: 8.4.1 (api:1/proto:86-100)
GIT-hash: 91b4c048c1a0e06777b5f65d312b38d47abaea80 build by ...0:
cs:SyncTarget ro:Secondary/Primary ds:Inconsistent/UpToDate A r----
ns:0 nr:27652 dw:27652 dr:0 al:0 bm:2 lo:0 pe:32 ua:0 ap:0 ep:1 wo:b oos:734040
[>....................] sync'ed: 3.8% (734040/761692)K
finish: 0:00:52 speed: 13,824 (13,824) K/sec

17. Start Asterisk on srv-a:

/etc/init.d/asterisk start

That’s all there is to it!