Find the correct driver: pcs stonith list
Find the parameters associated with the device: pcs stonith describe <agent name>
Create a local config to make changes to pcs cluster cib stonith_cfg
Create the fencing resource using pcs -f stonith_cfg stonith create <stonith_id> <stonith device type> [stonith device options]
Set stonith-enable to true. pcs -f stonith_cfg property set stonith-enabled=true
If the device does not know how to fence nodes based on their uname, you may also need to set the special pcmk_host_map
parameter. See man stonithd
for details.
If the device does not support the list command, you may also need to set the special pcmk_host_list
and/or pcmk_host_check
parameters. See man stonithd
for details.
If the device does not expect the victim to be specified with the port parameter, you may also need to set the special pcmk_host_argument
parameter. See man stonithd
for details.
Commit the new configuration. pcs cluster push cib stonith_cfg
Once the stonith resource is running, you can test it by executing: stonith_admin --reboot nodename
. Although you might want to stop the cluster on that machine first.