Show Table of Contents
4.4. 创建 Fencing 设备
使用以下命令创建 stonith 设备
pcs stonith create stonith_id stonith_device_type [stonith_device_options]
# pcs stonith create MyStonith fence_virt pcmk_host_list=f1 op monitor interval=30s
如果为几个节点使用单一 fence 设备,请为每个节点使用不同的端口,但不需要为每个节点分别创建设备。相反,可使用
pcmk_host_map 选项定义每个节点使用的端口。例如:使用以下命令创建名为 myapc-west-13 的单一 fencing 设备,该设备使用的 APC 电源开关为 west-apc,同时节点 west-13 使用端口 15。
# pcs stonith create myapc-west-13 fence_apc pcmk_host_list="west-13" ipaddr="west-apc" login="apc" passwd="apc" port="15"
但在下面的示例中则使用 APC 电源开关
west-apc 隔离使用端口 15 的节点 west-13、使用端口 17 的节点 west-14、使用端口 18 的节点 west-15、以及使用端口 19 的节点 west-16。
# pcs stonith create myapc fence_apc pcmk_host_list="west-13,west-14,west-15,west-16" pcmk_host_map="west-13:15;west-14:17;west-15:18;west-16:19" ipaddr="west-apc" login="apc" passwd="apc" 
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.