5.4. Creating a Fencing Device
The following command creates a stonith device.
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
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 determine what 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.
For information on the
pcmk_host_list
and pcmk_host_map
parameters, see Table 5.1, “General Properties of Fencing Devices”.
After configuring a fence device, it is imperative that you test the device to ensure that it is working correctly. For information on testing fence devices, see Section 5.12, “Testing a Fence Device”.