Configuring Virtuozzo Failover Cluster
The configuration procedures described below supposes the usage of the
system-config-cluster utility. With this utility, you should do the following:
- Use an existing cluster or create a new one (the creation of a new cluster is recommended).
- Add your servers to the cluster under the Cluster Nodes tree.
- If the same cluster manages other services, you need to create a new failover domain (e.g. the
VZ-servers name can be used) and add all your Virtuozzo cluster nodes to this domain.
- Add and configure fencing devices (note that using fencing devices is mandatory). Manual fencing is supported for testing purposes only and should not be used in production.
- Create resources:
- File system: one resource per each shared SCSI partition. Make sure that the partition is referred to by the volume label instead of by the device name. Also, do not forget to use the
noatime option. Please see the picture below:
- Script: one script per cluster:
- IP address: an IP address is needed for each Virtuozzo service (it will be used to connect to the Service Container and for a direct SSH connection to the host). Note that the IP address will be managed by the cluster; so, it should not be already in use and assigned to the nodes directly:
- Create the corresponding clustered services. The number of services corresponds to the number of active servers and shared partitions; also make sure that:
- The Service Autostart is enabled.
- The Service is configured to run exclusively; thus, the cluster will not attempt to run more than one Virtuozzo service on the same physical server (which is not currently supported).
- The Service recovery policy is 'Relocate' or 'Restart'; in the latter case, if the Virtuozzo service is stopped for some reason, the cluster will attempt to restart Virtuozzo Containers 4.0 on the same server before relocating it to another one.
- If Virtuozzo Containers 4.0 shares the cluster with other clustered applications, make sure the proper failover domain is specified (in the picture below, the failover domain is not set).
- The 'Script' Resource (
vz-service in our example) is attached to the 'File System' resource (
VZ-partition-2). This ensures the proper order of the services startup:
- Distribute the configuration file (
/etc/cluster/cluster.conf) to all the servers and start the clustering service:
# service cman start
# service rgmanager start
- Configure the clustering service on each node in the cluster to start in the default runlevel. For example, if your system default runlevel is set to 3, you can enable the service by executing the following commands on each of the cluster nodes:
# chkconfig --level 3 cman on
# chkconfig --level 3 rgmanager on
- After starting the service, you may further synchronize your configuration using the Send to Cluster button in the cluster configuration utility.
- Locate the Cluster Management section of the GUI tool or run the
clustat command line utility. Make sure that all the services have been successfully started. If they have not, investigate the cluster logs stored in
/var/log/messages by default. Please keep in mind that the information you are looking for may be placed on different servers in the cluster.
Please send us your feedback on this help page