[ClusterLabs] pacemaker as data store

Ken Gaillot kgaillot at redhat.com
Tue May 15 11:01:39 EDT 2018

On Tue, 2018-05-15 at 13:25 +0300, George Melikov wrote:
> Hello, 
> Sorry for a (likely) dumb question,
> but is there a way to store and sync data via pacemaker/corosync?
> Are there any way to store key/value properties or files?
> I've found `pcs property set --force`, but it didn't survive cluster
> restart.

That's surprising, cluster properties (even unrecognized ones) should
persist. After setting it, try double-checking that it was written to
disk with pcs cluster cib | less. I would use some prefix (like the
name of your organization) for all property names, to make conflicts
with real properties less likely.

Permanent node attributes are another possibility, though they record a
separate value for each node. The values of any node, however, can be
queried from any other node. That means you could just pick one node
and set all your name/value pairs using its name.

However, there's a reason not to use pacemaker for this purpose:
changes to cluster properties or node attributes will trigger a new
calculation of where resources should be. It won't cause any harm, but
it will add CPU and I/O load unnecessarily. Similarly, if your data set
is large, it will take longer to do such calculations, slowing down
recovery unnecessarily.

You could run etcd or some NoSQL database as a cluster resource, then
keep your data there.

> ____________________________________
> Sincerely,
> George Melikov,
> Tel. 7-915-278-39-36
> Skype: georgemelikov
> С наилучшими пожеланиями,
> Георгий Меликов,
> mail at gmelikov.ru
> Моб:         +7 9152783936
> Skype:     georgemelikov
Ken Gaillot <kgaillot at redhat.com>

More information about the Users mailing list