Create a fence device

Create a fence device by using the pcs stonith create command. To view all available creation options, use the pcs stonith -h command.

Procedure

  • Create a fence device:
    # pcs stonith create stonith_idstonith_device_type [stonith_device_options] [op  operation_actionoperation_options]
  • The following command creates a single fencing device for a single node:
    # pcs stonith create MyStonith fence_virt pcmk_host_list=f1 op monitor interval=30s

    Some fence devices can fence only a single node, while other devices can fence multiple nodes. The parameters you specify when you create a fencing device depend on what your fencing device supports and requires.

  • Some fence devices can automatically decide which nodes they can fence.
  • You can use the pcmk_host_list parameter when creating a fencing device to specify all of the machines that are controlled by that fencing device.
  • Some fence devices require a mapping of host names to the specifications that the fence device understands. You can map host names with the pcmk_host_map parameter when creating a fencing device.