4.2. 配置常规集群属性
为了避免在一个集群节点上运行以下命令来为 resource-stickiness
和 migration-threshold
参数设置默认值,以避免不必要的资源故障切换:
[root@node1]# pcs resource defaults update resource-stickiness=1 [root@node1]# pcs resource defaults update migration-threshold=3
注意
resource-stickiness=1
将鼓励资源保持运行,而 migration-threshold=3
将导致资源在 3 失败后移至新节点。3 通常足以防止资源被过早故障转移到另一节点。这也可确保资源故障切换时间保持在可控制的限制中。