8.8. Managing Cluster Resources with Scripts¶
Virtuozzo Storage comes with a number of scripts used by the
shaman utility to manage and monitor cluster resources. There are two types of scripts:
Common scripts. The common scripts are located in the
/usr/share/shamandirectory and used by the
shamanutility to call resource-specific scripts.
Resource-specific scripts. For each common script, there are one or more resource-specific scripts. Resource-specific scripts are peculiar to each cluster resource and located in separate subdirectories. For virtual machines and containers, these directories are
/usr/share/shaman/ct-, respectively. Resource-specific scripts are used to perform various actions on cluster resources.
The following example describes the process of using the relocate script:
shaman-monitordaemon checks at regular intervals whether some virtual machines and containers require relocation (usually, when a server fails and the virtual machines and containers hosted on it should be relocated to a healthy server).
If some virtual machines or containers are scheduled for relocation,
shaman-monitorcalls the common script
The common script
relocatecalls the scripts
/usr/share/shaman/ct-/relocateto relocate the virtual machines and containers to a healthy server.
If necessary, you can customize any of the scripts to meet your demands.
For the full list of scripts and their descriptions, see the
shaman-scripts man page.