Upgrading from MariaDB Galera Cluster 5.5 to MariaDB Galera Cluster 10.0

In order to upgrade a MariaDB Galera Cluster 5.5 to MariaDB Galera Cluster 10.0, the following steps need to be performed.

First, before you get started:

  1. First, take a look at Upgrading from MariaDB 5.5 to MariaDB 10.0 which documents the settings in the regular MariaDB server that have been removed or been changed. You will need to make sure that your settings are compatible with 10.0 before upgrading.
  2. Next, make sure that the Galera version numbers are compatible. If you are upgrading from the most recent MariaDB Galera Cluster 5.5 release to MariaDB Galera Cluster 10.0, then the versions will be compatible. If you are running an older MariaDB Galera Cluster 5.5 release that still uses a Galera 25.2.x provider, then it is recommended to first upgrade to the latest MariaDB Galera Cluster 5.5 release that uses a Galera 25.3.x provider. See What is MariaDB Galera Cluster?: Galera wsrep provider Versions for information on which MariaDB releases uses which Galera wsrep provider versions.
  3. Ideally, you want to have a large enough gcache to avoid a State Snapshot Transfer (SST) during the rolling upgrade. The gcache size can be configured by setting gcache.size For example:
    wsrep_provider_options="gcache.size=2G"

Before you upgrade, it would be best to take a backup of your database. This is always a good idea to do before an upgrade. We would recommend Percona XtraBackup.

Then, for each node, perform the following steps:

  1. Modify the repository configuration, so the system's package manager installs MariaDB 10.1. For example,
  2. If you use a load balancing proxy such as MaxScale or HAProxy, make sure to drain the server from the pool so it does not receive any new connections. If this is the final node being upgraded, at this point you can remove read-only from the remaining nodes.
  3. Set innodb_fast_shutdown to 0. It can be changed dynamically with SET GLOBAL. For example:
    SET GLOBAL innodb_fast_shutdown=0;
  4. Stop MariaDB.
  5. Uninstall the old version of MariaDB and the Galera wsrep provider.
    • On Debian, Ubuntu, and other similar Linux distributions, execute the following:
      sudo apt-get remove mariadb-galera-server galera
    • On RHEL, CentOS, Fedora, and other similar Linux distributions, execute the following:
      sudo yum remove MariaDB-Galera-server galera
    • On SLES, OpenSUSE, and other similar Linux distributions, execute the following:
      sudo zypper remove MariaDB-Galera-server galera
  6. Install the new version of MariaDB and the Galera wsrep provider.
  7. Make any desired changes to configuration options in option files, such as my.cnf. This includes removing any options that are no longer supported. Also, until all the nodes are upgraded, you will want to set read_only=ON. This will to prevent the upgraded MariaDB Galera Cluster 10.0 nodes from replicating to the existing MariaDB Galera Cluster 5.5 nodes, which is not supported. The final node being upgraded does not need to set read_only=ON.
  8. Start MariaDB.
  9. Run mysql_upgrade with the --skip-write-binlog option.
    • mysql_upgrade does two things:
      1. Ensures that the system tables in the mysql database are fully compatible with the new version.
      2. Does a very quick check of all tables and marks them as compatible with the new version of MariaDB .

When this process is done for one node, move onto the next node.

Note that when upgrading the Galera wsrep provider, sometimes the Galera protocol version can change. The Galera wsrep provider should not start using the new protocol version until all cluster nodes have been upgraded to the new version, so this is not generally an issue during a rolling upgrade. However, this can cause issues if you restart a non-upgraded node in a cluster where the rest of the nodes have been upgraded.

:

Comments

Comments loading...