Creating a Resource Group
As documented in the preceding sections, using the pcs resource create
command will create the group specified with the --group
option if it
does not already exist. A second way of creating a resource group is by using the
pcs resource group add
command, as shown in the following
example:
sudo pcs resource group add mygroup MyVirtualIP MyApacheWebsite
The preceding command creates group mygroup If it does not already exist, and adds existing resources MyVirtualIP and MyApacheWebsite to the group. If the resources specified in the command are in another group, they will be moved to the new group mygroup.
You can also use options --before
or --after
with the
pcs resource group add
command to specify the position of the
resource being created relative to a resource that already exists in the group.
See pcs(8)
and https://clusterlabs.org/ for more information on configuring resources and resource
groups.