Apart from the possibility to configure your cluster resources, the crm tool also allows you to manage existing resources. The following subsections gives you an overview.
To start a new cluster resource you need the respective identifier. Proceed as follows:
Open a shell to become root.
Enter crm to open the internal shell.
Switch to the resource level:
crm(live)# resourceStart the resource with start and press the Tab key to show all known resources:
crm(live)resource# start start ID
A resource will be automatically restarted if it fails, but each failure raises the resource's failcount. If a migration-threshold has been set for that resource, the node will no longer be allowed to run the resource as soon as the number of failures has reached the migration threshold.
Open a shell and log in as user root.
Get a list of all your resources:
crm resource list
...
Resource Group: dlm-clvm:1
dlm:1 (ocf::pacemaker:controld) Started
clvm:1 (ocf::lvm2:clvmd) Started
cmirrord:1 (ocf::lvm2:cmirrord) StartedIf the resource is running, it has to be stopped first. Replace RSC with the name of the resource.
crm resoure stop RSC
For example, if you want to stop the DLM resource, from the dlm-clvm resource group, replace RSC with dlm.
Delete the resource itself:
crm configure delete IDTo remove a cluster resource you need the relevant identifier. Proceed as follows:
Open a shell and become root.
Run the following command to get a list of your resources:
crm(live)# resource status
For example, the output can look like this (whereas myIP is the relevant identifier of your resource):
myIP (ocf::IPaddr:heartbeat) ...
Delete the resource with the relevant identifier (which implies a commit too):
crm(live)# configure delete YOUR_ID
Commit the changes:
crm(live)# configure commitAlthough resources are configured to automatically fail over (or migrate) to other nodes of the cluster in the event of a hardware or software failure, you can also manually migrate a resource to another node in the cluster using either the Pacemaker GUI or the command line.
Open a shell to become root.
Enter crm to open the internal shell.
To migrate a resource named ipaddress1 to a cluster node named node2, enter:
crm(live)# resource crm(live)resource# migrate ipaddress1 node2