当前位置: 首页 > HA, Linux, shell > 正文

pacemaker中clone资源的interleave参数使用小记

一直对pacemaker中clone/multi-state资源的interleave参数比较疑惑,今天终于栽到了这个上面;

原本以为可以得过且过,不用搞的太明白,现在也是无计可施,非得要搞明白了

摘录一篇让人豁然开朗的文章, 作为警示:

####################################################################################################

Ever wonder what meta interleave really means in a Pacemaker clone definition? We’ll explain.

The interleave meta attribute is only valid on Pacemaker clone definitions – and their extended version of sorts, master/slave sets. It’s not available on primitives and groups. Clones are often used in configurations involving cluster filesystems, such as GFS2 (here’s an example).

Consider the following example (primitive definitions omitted to keep this short):

    clone cl_foo p_foo meta interleave=false
    clone cl_bar p_bar meta interleave=false
    order o_foo_before_bar inf: cl_foo cl_bar

What this means is for the order constraint to be fulfilled, all instances of cl_foo must start before any instance of cl_bar can. Often, that’s not what you want.

In contrast, consider this:

    clone cl_foo p_foo meta interleave=true
    clone cl_bar p_bar meta interleave=true
    order o_foo_before_bar inf: cl_foo cl_bar

Here, for each node, as soon as the local instance of cl_foo has started, the corresponding local instance of cl_bar can, too. This is what’s usually desired – when in doubt, allow interleaving.

One thing that often throws people is that interleaving only works when Pacemaker is configured to run the same number of instances of two clones on the same node. Thus,

    clone cl_foo p_foo\
      meta interleave=true \
        globally-unique=true clone-node-max=2
    clone cl_bar p_bar meta interleave=false
    order o_foo_before_bar inf: cl_foo cl_bar

… won’t work, as Pacemaker is allowed to run 2 instances of cl_foo on the same node, but only one of cl_bar (the default for clone-node-max is 1).

Also, globally-unique=true is a requirement for any clone-node-max>1 – which means that interleaving between a globally-unique and a not globally-unique clone is also not supported.

####################################################################################################

主体意思:

当在cluster中使用多个克隆资源时, 如 存在 clone-a, clone-b 同时运行;想要实现各个节点上 a、b 资源的互不相干的顺序约束, 就需要使用到interleave参数了

多个clone资源都要使用interleave参数,仅仅部分资源使用是没有效果的

import:clone也包括多态资源

文章来源

interleaving-pacemaker-clones

    分享到:

本文固定链接: http://klwang.info/interleaving-pacemaker-clones/ | 数据库|Linux|软件开发

该日志由 klwang 于2013年06月30日发表在 HA, Linux, shell 分类下, 你可以发表评论,并在保留原文地址及作者的情况下引用到你的网站或博客。
原创文章转载请注明: pacemaker中clone资源的interleave参数使用小记 | 数据库|Linux|软件开发
关键字: , , , , , , ,

pacemaker中clone资源的interleave参数使用小记:等您坐沙发呢!

发表评论

*
快捷键:Ctrl+Enter