Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this page

Table of Contents
maxLevel5

Preparing to upgrade Cassandra

To prepare for Cassandra upgrade


  1. Ensure that all Cassandra nodes are ready. Run the following command and verify that all nodes are Up and Normal:
    Code Block
    languagebash
    themeDJango
    linenumberstrue
    nodetool status
  2. Leave the Cassandra service running but stop all Teamwork Cloud services.
  3. Back up your current database before upgrading.
  4. Upgrade all Cassandra data tables to current version by running the following command:
    Code Block
    languagebash
    themeDJango
    linenumberstrue
    nodetool upgradesstables
    Info

    This process can take a long time for large databases. Use the jobs option to use more threads for the operation (0 for maximum threads available, default is 2). Also, use the nohup command to run the upgrade process in the background.

    Code Block
    languagebash
    themeDJango
    linenumberstrue
    nohup nodetool upgradesstables --jobs 0 &

    Make sure this process is completed before proceeding!

Upgrading Cassandra

Magic Collaboration Studio no longer supports Apache Cassandra 3.x, therefore before upgrading Magic Collaboration Studio, you need to upgrade Casandra to version 4.1.

Note
titleBefore upgrading
  • Make sure that all the nodes are ready.
  • Create a snapshot of your data for backup.
  • Upgrade sstables by running the command nodetool upgradesstables on each node.
  • For the large databases, run the nohup nodetool upgradesstables & command to perform the upgrade tasks in the background.

To upgrade Cassandra


  1. IMPORTANT! Flush memtables to the disk by executing the following command:

    Code Block
    languagebash
    themeDJango
    linenumberstrue
    nodetool drain
  2. Shut down the Cassandra node.

  3. Backup the Cassandra configuration file at: /etc/cassandra/default.conf/cassandra.yaml

    Stop the Cassandra service.

  4. Make a note of the existing cluster name and token count with the following command:

    Code Block
    languagebash
    themeDJango
    linenumberstrue
    grep -E 'num_tokens:|cluster_name:' cassandra.yaml
  5. Uninstall/remove Cassandra 3.x (example with yum package manager)

    Code Block
    languagebash
    themeDJango
    linenumberstrue
    sudo yum remove -y cassandra
  6. Install Cassandra 4.x. for installation instructions, see Installing Cassandra on Linux or Installing Cassandra on Windows.
  7. Info

    Cassandra configuration files are saved with .rpmsave extension after uninstallation (default path:

    Configure the 4.x node to point to the appropriate data files in the

    /etc/cassandra/default.conf

    /cassandra.yaml settings as shown in the example below. Code Block
    languagebash
    titleExample
    data_file_directories: - /data/data commitlog_directory: /logs/commitlog hints_directory: /data/hints saved_caches_directory: /data/saved_caches

    ). Archive these files for future reference.

  8. Install new version of Cassandra (for installation instructions, see Installing Cassandra on Linux).
  9. Check the cluster name and token count in in cassandra.yaml. If needed, replace the default values with the values set in 3.xthe previous version. The example below shows the default values for a Cassandra 4.x installation. 

    Code Block
    languagebash
    titleExample
    cluster_name: 'Test Cluster'
    num_tokens: 16
    Note
    titleCassandra 4 Configuration

    The cluster name and token count must match those values set in the previous version of Cassandra 3.x.

  10. Start the Cassandra 4.x node.service.
  11. Check if the service is running smoothly:

    • Check the log

    files
    • file for startup errors.

    • Verify that all nodes have a status of Up and Normal with this command:

      Code Block
      languagebash
      themeDJango
      linenumberstrue
      nodetool status
  12. Upgrade all Cassandra data tables to current version by running the following command:
    Code Block
    languagebash
    themeDJango
    linenumberstrue
    nodetool upgradesstables
    Info

    This process can take a long time for large databases. Use the jobs option to use more threads for the operation (0 for maximum threads available, default is 2). Also, use the nohup command to run the upgrade process in the background.

    Code Block
    languagebash
    themeDJango
    linenumberstrue
    nohup nodetool upgradesstables --jobs 0 &

    Make sure this process is completed before proceeding!

    After the upgrade is complete, perform the required post-installation configuration changes. For more information, see Post-installation steps on Linux or Post-installation steps on Windows.


Additional resources

For more information about upgrading Apache Cassandra, see https://www.datastax.com/learn/whats-new-for-cassandra-4/migrating-cassandra-4x.