Upgrading the HA Environment
To upgrade an IBM Aspera Shares HA deployment, you must upgrade each Shares node individually and then reconfigure them to run in an HA environment.
Stopping the Cronjobs for Upgrade
On both nodes, stop the cronjob by commenting out the jobs.
# crontab -e
# * * * * * /opt/aspera/acm/bin/acm 10.0.71.21 20 > /dev/null 2>&1
# 30 3 * * * /opt/aspera/acm/bin/acmtl -b > /dev/null 2>&1
# 45 3 * * 7 echo -n "" > /opt/aspera/common/asctl/log/asctl.log > /dev/null 2>&1
Back Up Shares on Both Nodes
-
Back up Shares files on both nodes:
# /opt/aspera/shares/u/setup/bin/backup /backup_dir
Note: The rake task runs as an unprivileged user. Ensure ensure the destination directory is writable by all users. Aspera recommends using /tmp.For example:# /opt/aspera/shares/u/setup/bin/backup /tmp Creating backup directory /tmp/20130627025459 ... Checking status of aspera-shares ... Status is running mysqld is alive Backing up the Shares database and config files ... Backing up the SSL certificates ... Done
-
Make a note of the ID of the created backup directory for future use. In
the above example:
20130627025459
.
Upgrade Shares on the Active Node
-
On the active node, disable ACM.
# /opt/aspera/acm/bin/acmctl -D ACM is disabled globally
-
Check the node status.
# /opt/aspera/acm/bin/acmctl -i Checking current ACM status... Aspera Cluster Manager status ----------------------------- Local hostname: hashares2 Active node: hashares2 (me) Status of this node: active Status file: current Disabled globally: yes Disabled on this node: no Database configuration file --------------------------- Database host: 10.0.115.102
Shares active/active services status ------------------------------------ nginx: running crond: running
Shares active/passive services status ------------------------------------- mysqld: running shares-background-default-0: running shares-background-nodes-0: running shares-background-users-0: running shares-background-users-1: running shares-background-users-2: running
-
Unpack the installer.
Run the following command as root, where version is the package version:
The following is an example of the output generated:# rpm -Uvh aspera-shares-version.rpm
Preparing... ########################################### [100%] Switching to the down runlevel ... runsvchdir: down: now current. Switched runlevel Checking status of aspera-shares ... Status is running Stopping aspera-shares ... Stopped 1:aspera-shares ########################################### [100%] To complete the upgrade, please run this script as the root user: [root]$ /opt/aspera/shares/u/setup/bin/upgrade
-
Run the upgrade script.
The following is an example of the output generated during the upgrade:# /opt/aspera/shares/u/setup/bin/upgrade
Starting aspera-shares ... Started Waiting for MySQL server to answer mysqld is alive Migrating the Shares database ... Initializing the Shares database ... Clearing background jobs ... Migrating the stats collector database ... Done
-
Stop all Shares services.
# service shares stop
Manually Fail Over to the Passive Node and Upgrade Shares
-
On the passive node, enable ACM locally .
# /opt/aspera/acm/bin/acmctl -e ACM is enabled locally
-
Check the node status.
# /opt/aspera/acm/bin/acmctl -i Checking current ACM status... Aspera Cluster Manager status ----------------------------- Local hostname: hashares1 Active node: hashares1 (me) Status of this node: active Status file: current Disabled globally: no Disabled on this node: no Database configuration file --------------------------- Database host: 10.0.115.102
Shares active/active services status ------------------------------------ nginx: running crond: running
Shares active/passive services status ------------------------------------- mysqld: running shares-background-default-0: running shares-background-nodes-0: running shares-background-users-0: running shares-background-users-1: running shares-background-users-2: running
Stop services to perform Shares upgrade.
-
Disable ACM locally.
# /opt/aspera/acm/bin/acmctl -d ACM is disabled locally
-
Stop all Shares services.
# service shares stop
-
Unpack the installer.
Run the following command as root, where version is the package version:
The following is an example of the output generated:# rpm -Uvh aspera-shares-version.rpm
Preparing... ########################################### [100%] Switching to the down runlevel ... runsvchdir: down: now current. Switched runlevel Checking status of aspera-shares ... Status is running Stopping aspera-shares ... Stopped 1:aspera-shares ########################################### [100%] To complete the upgrade, please run this script as the root user: [root]$ /opt/aspera/shares/u/setup/bin/upgrade
-
Run the upgrade script.
The following is an example of the output generated during the upgrade:# /opt/aspera/shares/u/setup/bin/upgrade
Starting aspera-shares ... Started Waiting for MySQL server to answer mysqld is alive Migrating the Shares database ... Initializing the Shares database ... Clearing background jobs ... Migrating the stats collector database ... Done
-
Enable ACM locally .
# /opt/aspera/acm/bin/acmctl -e ACM is enabled locally
-
Check the node status of the two nodes to make sure one is active and one
is passive.
# /opt/aspera/acm/bin/acmctl -i Aspera Cluster Manager status ----------------------------- Local hostname: hashares1 Active node: hashares1 (me) Status of this node: active Status file: current Disabled globally: no Disabled on this node: no Database configuration file --------------------------- Database host: 10.0.115.102
Shares active/active services status ------------------------------------ nginx: running crond: running
Shares active/passive services status ------------------------------------- mysqld: running shares-background-default-0: running shares-background-nodes-0: running shares-background-users-0: running shares-background-users-1: running shares-background-users-2: running
# /opt/aspera/acm/bin/acmctl -i Checking current ACM status... Aspera Cluster Manager status ----------------------------- Local hostname: hashares2 Active node: hashares2 (me) Status of this node: passive Status file: current Disabled globally: no Disabled on this node: no Database configuration file --------------------------- Database host: 10.0.115.102
Shares active/active services status ------------------------------------ nginx: running crond: running
Shares active/passive services status ------------------------------------- mysqld: not running shares-background-default-0: not running shares-background-nodes-0: not running shares-background-users-0: not running shares-background-users-1: not running shares-background-users-2: not running
-
Restart the cronjobs on both the nodes by uncommenting the
jobs.
# crontab -e * * * * * /opt/aspera/acm/bin/acm 10.0.71.21 20 > /dev/null 2>&1 30 3 * * * /opt/aspera/acm/bin/acmtl -b > /dev/null 2>&1 45 3 * * 7 echo -n "" > /opt/aspera/common/asctl/log/asctl.log > /dev/null 2>&1