[ClusterLabs] to change resource id - how?

Ken Gaillot kgaillot at redhat.com
Mon Apr 3 10:26:04 EDT 2017

On 04/03/2017 06:35 AM, lejeczek wrote:
> hi
> I'm sroogling and reading but cannot find any info - how to
> (programmatically) change resources ids? In other words: how to rename
> these entities?
> many thanks
> L

As far as I know, higher-level tools don't support this directly -- you
have to edit the XML. The basic process is:

1. Save a copy of the live CIB to a file.
2. Edit that file, and do a search-and-replace on the desired name (so
you change it in constraints, etc., as well as the resource definition).
3. Push the configuration section of that file to the live CIB.

The higher-level tools have commands to do that, but at the low level,
it would be something like:

1. cibadmin -Q --scope configuration > tmp.cib
2. vim tmp.cib
3. cibadmin -x tmp.cib --replace --scope configuration

The cluster will treat it as a completely new resource, so it will stop
the old one and start the new one.

More information about the Users mailing list