3.2. Upgrading Virtuozzo 6 and 7 with Virtuozzo Storage

This section describes how to upgrade Virtuozzo Storage with CLI management based on Virtuozzo 6 or 7 to Virtuozzo Storage with GUI management based on Virtuozzo 7. The procedure consists of two major parts: upgrading the first cluster node and upgrading the second and other cluster nodes.

To upgrade the first node in your cluster, do the following:

  1. Install all available updates on Virtuozzo Storage nodes by running yum update on each.

    Note

    The oldest Virtuozzo 6 build eligible for upgrade is 6.0.11-3466.

  2. Choose a Virtuozzo Storage node to upgrade. Migrate VMs and containers from this node to other Virtuozzo Storage nodes. If you also keep backups on this node, move their files to a temporary location. If you have iSCSI targets registered on this node, stop the iSCSI targets if they are up and unregister them from the node (for instructions, refer to Moving iSCSI Targets between Virtuozzo Storage Clusters).

    If you use Virtuozzo Automator, you can migrate VMs and containers with it. If you do not, you may need to consult the following, depending on your migration scenario: Virtuozzo 6 User’s Guide, Virtuozzo 7 User’s Guide, or Migrating VMs and Containers from Virtuozzo 6 to Virtuozzo 7.

  3. Remove chunk and metadata servers from the chosen node:

    1. Find out which chunk and metadata servers are located on the node by running pstorage -c <cluster_name> top (Virtuozzo 6) or vstorage -c <cluster_name> top (Virtuozzo 7) on any node in the cluster.

    2. Remove metadata servers from the node by running pstorage -c <cluster_name> rm-mds <MDS_ID> (Virtuozzo 6) or vstorage -c <cluster_name> rm-mds <MDS_ID> (Virtuozzo 7) for each MDS on the node.

    3. Initiate removal of chunk servers from the node by running pstorage -c <cluster_name> rm-cs --wait <CS_ID> (Virtuozzo 6) or vstorage -c <cluster_name> rm-cs --wait <CS_ID> (Virtuozzo 7) for each CS on the node.

    4. Wait until the chunk servers are removed from the node and Virtuozzo Storage rebuilds.

      To monitor this process, run pstorage -c <cluster_name> top (Virtuozzo 6) or vstorage -c <cluster_name> top (Virtuozzo 7) on any node in the cluster. The status of the chunk servers being removed will change to releasing and the number of replicas on them will start to decrease. When the number of replicas on a CS reaches zero, the CS will be removed both from the node and pstorage top (vstorage top) output. Make sure that no chunk servers are left on the node to be upgraded.

  4. Perform a fresh install of Virtuozzo 7 on the node. It will be the first node in your new Virtuozzo Storage infrastructure.

    During installation, choose to install the Virtuozzo Storage management panel and Virtuozzo Automator management panel.

    Note

    If you already have Virtuozzo Automator set up, you can use it instead. To easily switch to the Virtuozzo Storage management panel, you can install Virtuozzo Storage management plugin for your Virtuozzo Automator as described here.

    After installation, the node will show up as a storage node in the newly installed Virtuozzo Storage management panel.

  5. Manually enable backward compatibility to allow managing the cluster from the upgraded node and the new Virtuozzo Storage management panel.

    To do this, log in to the upgraded node and set the Environment parameter to PCS_FORCE_CLNT_ID=1 in the /usr/lib/systemd/system/vstorage-ui-agent.service file. For example:

    <...>
    Environment=PCS_FORCE_CLNT_ID=1 AGENT_CONFIG<...>
    <...>
    

    Then restart the vstorage-ui-agent service:

    # systemctl daemon-reload
    # systemctl restart vstorage-ui-agent
    
  6. Log in to the Virtuozzo Storage management panel and assign the network role Storage to the node’s network interface. For instructions, see the Virtuozzo Storage Administrator’s Guide.

  7. Authenticate the node in the existing Virtuozzo 6 cluster by running the following command on it:

    # vstorage -c <cluster_name> auth-node
    

    Specify the cluster password when prompted.

  8. Register the cluster in the Virtuozzo Storage management panel and add the already upgraded node to the cluster.

    To do this:

    1. In the management panel, click ADD NODE and save the shown token.

    2. On the upgraded node, run the /usr/libexec/vstorage-ui-agent/bin/register-storage-node.sh script, specifying the IP address of the container with the management panel and the token you obtained earlier. For example:

      # /usr/libexec/vstorage-ui-agent/bin/register-storage-node.sh -m <management_panel_IP> -t <token> -r -P
      

      Specify cluster password when prompted.

    The existing cluster configuration will be detected, the cluster will be added to the management panel, and the node will be added to the cluster.

    After the script completes, the complete cluster parameters (physical and logical space, number of CS and MDS, etc.) will be displayed on the OVERVIEW screen. However, only the node you have already upgraded will be shown on the NODES screen.

  9. In Virtuozzo Storage management panel, assign to node disks the same storage roles they had before the upgrade. For example, Storage (CS) and Metadata (MDS). For instructions, see the Virtuozzo Storage Administrator’s Guide.

  10. Wait until the cluster rebalances the data between chunk servers and HEALTHY is shown on the OVERVIEW screen.

  11. Create the desired datastores for VMs, containers, and backups as described in the Virtuozzo Storage Administrator’s Guide.

    Note

    If you are upgrading a Virtuozzo Storage cluster based on Virtuozzo 6, use only replication for datastores as erasure coding is not supported by Virtuozzo 6.

  12. Log in to Virtuozzo Automator, open the node summary, and choose to place VMs, containers, and backups in the created Virtuozzo Storage datastores. For instructions, see the Virtuozzo Automator Administrator’s Guide.

  13. Register existing Virtuozzo 6 nodes in Virtuozzo Automator:

    1. Update the VA Agent on these nodes to the latest version as described here.
    2. Add Virtuozzo 6 nodes to Virtuozzo Automator one by one by clicking New... > Hardware Node and providing the necessary details.
  14. From Virtuozzo Automator, migrate VMs and containers back to the upgraded node. They will be placed in the specified datastore(s). In addition, if you previously moved backups to the temporary location, you can place them in a new Virtuozzo Storage datastore by moving their files to /mnt/vstorage/vols/datastores/<datastore_name>.

  15. To re-register iSCSI targets on this node, refer to Moving iSCSI Targets between Virtuozzo Storage Clusters.

The first node is upgraded. Now you can upgrade the second and other nodes:

  1. Choose a node to upgrade. Migrate VMs and containers, move backups, and unregister iSCSI targets from it as you did for the first node.

  2. Remove chunk servers from the node as you did for the first node.

  3. Perform a fresh install of Virtuozzo 7 on the node. During installation, choose to install the Storage and Compute components for Virtuozzo Storage and Automator, respectively.

  4. In the Virtuozzo Storage management panel, assign the network roles to node’s network interfaces as you did for the first node and add it to the cluster.

  5. In Virtuozzo Automator, choose datastores for the node as you did for the first node.

  6. Re-register iSCSI targets on this node as you did for the first node.

  7. Repeat these steps for the remaining nodes in the cluster until the entire cluster is upgraded to Virtuozzo Storage with GUI management based on Virtuozzo 7.

  8. Revert the changes made to the Environment parameter in the /usr/lib/systemd/system/vstorage-ui-agent.service file on the first node. For example:

    <...>
    Environment=AGENT_CONFIG<...>
    <...>
    

Restart vstorage-ui-agent:

# systemctl daemon-reload
# systemctl restart vstorage-ui-agent