Previous page

Next page

Locate page in Contents

Print this page

Managing Cluster Resources with Scripts

Parallels Cloud 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/shaman directory and used by the shaman utility 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/vm- and /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:

  1. The shaman-monitor daemon 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).
  2. If some virtual machines or Containers are scheduled for relocation, shaman-monitor calls the /usr/share/shaman/relocate common script. If no virtual machines and Containers need to be relocated, the script is not called.
  3. The relocate common script calls the /usr/share/shaman/vm-/relocate and /usr/share/shaman/ct-/relocate scripts to 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.