7.4. 显示限制
您可以使用一些命令来显示已经配置的约束。
以下命令列出所有当前位置、顺序和 colocation 约束。
pcs constraint list|show
pcs constraint list|show
以下命令列出所有当前位置限制。
- 如果指定了
资源,则每个资源会显示位置限制。这是默认的行为。 - 如果指定了
节点,则每个节点会显示位置限制。 - 如果指定了特定资源或节点,则只显示那些资源或节点的信息。
pcs constraint location [show resources|nodes [specific nodes|resources]] [--full]
pcs constraint location [show resources|nodes [specific nodes|resources]] [--full]
以下命令列出所有当前排序限制。如果指定了
--full 选项,显示内部约束 ID。
pcs constraint order show [--full]
pcs constraint order show [--full]
以下命令列出所有当前的 colocation 约束。如果指定了
--full 选项,显示内部约束 ID。
pcs constraint colocation show [--full]
pcs constraint colocation show [--full]
以下命令列出引用特定资源的约束。
pcs constraint ref resource ...
pcs constraint ref resource ...