8.2. Enabling and Disabling High Availability on Nodes¶
To enable high availability on a node means to enable it for all virtual machines and containers residing on this node. You can only enable HA on nodes participating in a Virtuozzo Storage cluster.
Note
When you assign the network role “ISCSI” to a node’s network interface or join a node to an S3 cluster in the Virtuozzo Storage management panel, high availability is automatically enabled for virtual machines and containers on this node in the round-robin mode.
To enable high availability on a node, do the following:
Update Virtuozzo Storage to the latest version with
yum update.Run the
hastartscript. For example, if the node is joined to the clustervstor1, run:# hastart vstor1 <storage_network/network_mask>
where
<storage_network>is thevstor1cluster internal network and<network_mask>covers all the nodes in the clustervstor1.The script will automatically install, configure, and start the HA services on the node as well as add the node to the HA configuration.
After enabling HA for the node, you can check the result with the shaman stat command.
8.2.1. Disabling High Availability for Specific Virtual Machines and Containers¶
By default, if high availability is enabled on a node, it affects all virtual machines and containers on said node. If necessary, you can disable HA for specific virtual machines and containers using the prlctl set command. For example:
# prlctl set MyVM --ha-enable no
To re-enable HA support, run:
# prlctl set MyVM --ha-enable yes
8.2.2. Enabling High Availability for iSCSI Targets¶
Note
If you use Virtuozzo Storage with GUI management, enable HA for iSCSI targets by assigning the network role “ISCSI” to a node’s network interface.
If you use Virtuozzo Storage with CLI management, high availability for iSCSI targets is disabled by default. To enable it on a cluster node, do the following:
If not yet done, enable HA on the node using the
hastartscript as described in the previous section.Add the iSCSI
shamanrole to the node. For example, on a node in the clustervstor1, run:# shaman -c vstor1 add-role ISCSI
8.2.3. Disabling High Availability on Nodes¶
Disabling HA on a node disables it for all virtual environments and iSCSI targets residing on this node.
To disable HA on a node, do the following:
Disable and stop HA services:
# systemctl disable shaman.service # systemctl stop shaman.service # systemctl disable pdrs.service # systemctl stop pdrs.service
Remove the node from the HA configuration. For example, for a node in the cluster
vstor1, run:# shaman -c vstor1 leave