Resource Start and Stop Order in a Resource Group

If the resource group in the preceding examples, myapachegroup, is started from a stopped status, the resources will be started in the order they were added to the group:

  1. MyVirtualIP , the first resource to be added to the resource group, will be started first.

  2. MyApacheWebsite, the second resource to be added to the resource group, will be started second.

Conversely, when the resource group is stopped, the resources will be stopped in the opposite order of that in which they were added to the group:

  1. MyApacheWebsite, the last resource added to the resource group in the preceding examples, will be stopped first.

  2. MyVirtualIP , the first resource added to the resource group in the preceding examples, will be stopped last.

You can also explicitly set the start order by using options --before or --after when creating a resource with the pcs resource create command to specify the position of the resource being created relative to a resource that already exists in the group.

The pcs resource group add command also enables you to specify resource sequence. See Creating a Resource Group for more information.