MariaDB starting with 10.1

In MariaDB 10.1 there is no separate MariaDB Galera Cluster package anymore, Galera support is now included in the regular server package.

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

  1. First, take a look at Upgrading from MariaDB 10.0 to MariaDB 10.1 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.1 before upgrading.
  2. Next, make sure that the Galera version numbers are compatible. If you are upgrading from the most recent MariaDB 10.0 Galera to MariaDB 10.1, the versions will be compatible. If you are running an older 10.0 version with Galera 25.2.x, it is recommended to first upgrade to the latest 10.0 version, running Galera 25.3.x. See Galera versions for an indication.
  3. Ideally, you want to have a large enough cache (gcache.size) to avoid a State Snapshot Transfer (SST). For example: wsrep_provider_options="gcache.size=2G"
  4. Modify the repo URLs, for example,
    • On Ubuntu: # sudo sed -i 's/10.0/10.1/' /etc/apt/sources.list.d/MariaDB.list
    • On CentOS / RHEL: # sed -i 's/10.0/10.1/' /etc/yum.repos.d/MariaDB.repo
  5. Stop the server, for example service mysql stop 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 modes.
  6. Remove the old version, for example:
    • # yum remove MariaDB-Galera-server
  7. Update the configuration file, removing any options that are no longer supported. Also, until all the nodes are upgraded, you will want to set the node to be read-only (to prevent 10.1 propagating to 10.0, which is not supported): read_only=ON. The final node being upgraded need not be set to read-only. It is important to note that a new option is needed for Galera to be active in 10.1, wsrep_on=on .
  8. On Linux distributions that use #systemd# you man need to increase the service startup timeout as the default timeout of 20 minutes may not be sufficient if a SST becomes necessary
    • create a file /etc/systemd/system/mariadb.service.d/timeout.conf with content
      [Service]
      TimeoutSec=infinity
    • if you are using a systemd version older than version 229 you have to replace infinity with 0
    • execute
      systemctl daemon-reload
      for the new timeout setting to take effect
    • (see also Notes about systemd)
  9. Install the new version, for example:
    • # yum install MariaDB-server MariaDB-client MariaDB-shared MariaDB-common galera
  10. Start the service. e.g.:
    • # service mysql start
  11. Run mysql_upgrade if necessary (some distributions, such as Debian and Ubuntu, do this automatically):

Comments

Comments loading...