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 Hybrid Server 7. The procedure consists of two major parts: upgrading the first cluster node and upgrading the second and other cluster nodes.
Important
In a mixed cluster, it is critical to upgrade metadata services (MDS) last.
Note
After upgrading a node in a mixed cluster, you cannot migrate VEs (virtual machines and containers) created in datastores with encoding EC 3+2, 5+2, 7+2, or 17+3 from VHS 7.5 Update 4 to VHS 7.5 Update 3. However, the migration of VEs created in local datastores and datastores with a 3-replica and 2-replica data redundancy mode is available. A mixed cluster is not supported and exists during the upgrade only.
To upgrade the first node in your cluster, do the following:
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.
Choose a Virtuozzo Storage node to upgrade. If possible, choose one without MDS servers. 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:
Remove chunk servers from the chosen node:
Find out which chunk and metadata servers are located on the node by running
pstorage -c <cluster_name> top
(Virtuozzo 6) orvstorage -c <cluster_name> top
(Virtuozzo Hybrid Server 7) on any node in the cluster.Initiate removal of chunk servers from the node by running
pstorage -c <cluster_name> rm-cs --wait <CS_ID>
(Virtuozzo 6) orvstorage -c <cluster_name> rm-cs --wait <CS_ID>
(Virtuozzo Hybrid Server 7) for each CS on the node.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) orvstorage -c <cluster_name> top
(Virtuozzo Hybrid Server 7) on any node in the cluster. The status of the chunk servers being removed will change toreleasing
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 andpstorage top
(vstorage top
) output. Make sure that no chunk servers are left on the node to be upgraded.
If the node has metadata servers, remove them by running
pstorage -c <cluster_name> rm-mds <MDS_ID>
(Virtuozzo 6) orvstorage -c <cluster_name> rm-mds <MDS_ID>
(Virtuozzo Hybrid Server 7) for each MDS on the node.Perform a fresh install of Virtuozzo Hybrid Server 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 (see Installing Management Panel and Compute on the First Server) and the Virtuozzo Automator management panel (see Installing Management Panel and Compute on the First Server).
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 in Logging In to Virtuozzo Storage Management Panel.
After installation, the node will show up as a storage node in the newly installed Virtuozzo Storage management panel.
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 toPCS_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
Log in to the Virtuozzo Storage management panel and assign the network role Storage to the node’s network interface. For instructions, see Configuring Node Network Interfaces.
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.
Register the cluster in the Virtuozzo Storage management panel and add the already upgraded node to the cluster.
To do this:
In the management panel, click ADD NODE and save the shown token.
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.
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 Assigning Disk Roles Manually.
Wait until the cluster rebalances the data between chunk servers and HEALTHY is shown on the OVERVIEW screen.
Create the desired datastores for VMs, containers, and backups as described in Managing Datastores.
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.
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 Configuring Virtual Environments Host Settings.
Register existing Virtuozzo 6 nodes in Virtuozzo Automator:
Update the VA Agent on these nodes to the latest version as described here.
Add Virtuozzo 6 nodes to Virtuozzo Automator one by one by clicking New… > Hardware Node and providing the necessary details.
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>
.To re-register iSCSI targets on this node, refer to Moving iSCSI Targets between Virtuozzo Storage Clusters.
The first node is upgraded. Proceed with the remaining nodes, choosing ones without MDS servers first.
Choose a node to upgrade. Migrate VMs and containers, move backups, and unregister iSCSI targets from it as you did for the first node.
Remove chunk servers from the node as you did for the first node.
Perform a fresh install of Virtuozzo Hybrid Server 7 on the node. During installation, choose to install these components:
Storage for Virtuozzo Storage, see Installing Storage on the Second and Other Servers, and
Compute for Virtuozzo Automator, see Installing Compute on the Second and Other Servers
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 as explained in Adding Nodes to the Cluster.
Important
When assigning disk roles in a mixed cluster, make sure that the number of Virtuozzo 6 MDS servers is never equal to that of Virtuozzo Hybrid Server 7.
In Virtuozzo Automator, choose datastores for the node as you did for the first node.
Re-register iSCSI targets on this node as you did for the first node.
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 Hybrid Server 7.
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