FENCE_AGENT(8)
π FENCE_AGENT(8) π
okay bestie, welcome to the manual page for fence_mpath, and yes it lives in section 8 of the System Manager's Manual, we love a classic π
β¨ NAME β¨
fence_mpath β Fence agent for multipath persistent reservation π¦
πΈ DESCRIPTION πΈ
So. fence_mpath is an I/O Fencing agent that uses SCSI-3 persistent reservations to control access to multipath devices. The way that it works is honestly iconic.
Underlying devices must support SCSI-3 persistent reservations (that's SPC-3 or greater, no cap) and they also have to support the "preempt-and-abort" subcommand. Both. Not optional. π
Here's the vibe: fence_mpath works by having a unique key for each node, and that key has to be set in /etc/multipath.conf. Once registered, a single node will become the reservation holder by creating a "write exclusive, registrants only" reservation on the device(s). The result? Only registered nodes may write to the device(s). periodt.
When a node failure occurs, the fence_mpath agent will remove the key belonging to the failed node from the device(s). The failed node will no longer be able to write to the device(s). A manual reboot is required. π
When used as a watchdog device you can define e.g.retry=1,retry-sleep=2andverbose=yesparameters in/etc/sysconfig/stonithif you have issues with it failing. (just a lil tip from the original, not me being dramatic, it's literally in there π«Ά)
The fence agent accepts options on the command line as well as from stdin. Fenced sends parameters through stdin when it execs the agent. The agent can be run by itself with command line options β this is useful for testing and for turning outlets on or off from scripts. slay for scripting honestly β¨
Vendor URL: https://www.sourceware.org/dm/
π PARAMETERS π
-o,--action=[action]β Fencing action (Default Value:off)-d,--devices=[devices]β List of devices to use for current operation. Devices can be comma or space separated list of device-mapper multipath devices (eg./dev/mapper/3600508b400105df70000e00000ac0000or/dev/mapper/mpath1). Each device must support SCSI-3 persistent reservations.-k,--key=[key]β Replaced byport/-n/--plug-n,--plug=[key]β Key to use for the current operation. This key should be unique to a node and have to be written in/etc/multipath.conf. For the"on"action, the key specifies the key use to register the local node. For the"off"action, this key specifies the key to be removed from the device(s).--suppress-errorsβ Error log suppression.-q,--quietβ Disable logging to stderr. Does not affect--verboseor--debug-fileor logging to syslog.-v,--verboseβ Verbose mode. Multiple-vflags can be stacked on the command line (e.g.,-vvv) to increase verbosity.--verbose-levelβ Level of debugging detail in output. Defaults to the number of--verboseflags specified on the command line, or to1ifverbose=1in a stonith device configuration (i.e., on stdin).-D,--debug-file=[debugfile]β Write debug information to given file-V,--versionβ Display version information and exit-h,--helpβ Display help and exit--plug-separator=[char]β Separator for plug parameter when specifying more than 1 plug (Default Value:,)--delay=[seconds]β Wait X seconds before fencing is started (Default Value:0)--disable-timeout=[true/false]β Disable timeout (true/false) (default:truewhen run from Pacemaker 2.0+)--login-timeout=[seconds]β Wait X seconds for cmd prompt after login (Default Value:5)--mpathpersist-path=[path]β Path tompathpersistbinary (Default Value:/usr/sbin/mpathpersist)--power-timeout=[seconds]β Test X seconds for status change after ON/OFF (Default Value:20)--power-wait=[seconds]β Wait X seconds after issuing ON/OFF (Default Value:0)--shell-timeout=[seconds]β Wait X seconds for cmd prompt after issuing command (Default Value:3)--stonith-status-sleep=[seconds]β Sleep X seconds between status calls during a STONITH action (Default Value:1)--store-path=[path]β Path to directory where fence agent can store information (Default Value:/var/run/cluster)--retry-on=[attempts]β Count of attempts to retry power on (Default Value:1)--use-sudoβ Use sudo (without password) when calling 3rd party software--sudo-path=[path]β Path to sudo binary (Default Value:/usr/bin/sudo)
π ACTIONS π
onβ Power on machine.offβ Power off machine.statusβ This returns the status of the plug/virtual machine.monitorβ Check the health of fence devicemetadataβ Display the XML metadata describing this resource.manpageβ The operational behavior of this is not known.validate-allβ Validate if all required parameters are entered.
π§ STDIN PARAMETERS π§
actionβ Fencing action (Default Value:off)devicesβ List of devices to use for current operation. Devices can be comma or space separated list of device-mapper multipath devices (eg./dev/mapper/3600508b400105df70000e00000ac0000or/dev/mapper/mpath1). Each device must support SCSI-3 persistent reservations.keyβ Replaced byport/-n/--plugplugβ Key to use for the current operation. This key should be unique to a node and have to be written in/etc/multipath.conf. For the"on"action, the key specifies the key use to register the local node. For the"off"action, this key specifies the key to be removed from the device(s). Obsoletes:portsuppress_errorsβ Error log suppression. Obsoletes:suppress-errorsquietβ Disable logging to stderr. Does not affect--verboseor--debug-fileor logging to syslog.verboseβ Verbose mode. Multiple-vflags can be stacked on the command line (e.g.,-vvv) to increase verbosity.verbose_levelβ Level of debugging detail in output. Defaults to the number of--verboseflags specified on the command line, or to1ifverbose=1in a stonith device configuration (i.e., on stdin).debug_fileβ Write debug information to given file Obsoletes:debugversionβ Display version information and exithelpβ Display help and exitplug_separatorβ Separator for plug parameter when specifying more than 1 plug (Default Value:,)delayβ Wait X seconds before fencing is started (Default Value:0)disable_timeoutβ Disable timeout (true/false) (default:truewhen run from Pacemaker 2.0+)login_timeoutβ Wait X seconds for cmd prompt after login (Default Value:5)mpathpersist_pathβ Path tompathpersistbinary (Default Value:/usr/sbin/mpathpersist)power_timeoutβ Test X seconds for status change after ON/OFF (Default Value:20)power_waitβ Wait X seconds after issuing ON/OFF (Default Value:0)shell_timeoutβ Wait X seconds for cmd prompt after issuing command (Default Value:3)stonith_status_sleepβ Sleep X seconds between status calls during a STONITH action (Default Value:1)store_pathβ Path to directory where fence agent can store information (Default Value:/var/run/cluster)retry_onβ Count of attempts to retry power on (Default Value:1)use_sudoβ Use sudo (without password) when calling 3rd party software Obsoletes:sudosudo_pathβ Path to sudo binary (Default Value:/usr/bin/sudo)
and that's the whole thing, bestie!! every flag, every default, every obsolete alias, all of it, we did NOT skip a single crumb π
this lil masterpiece is fence_mpath (Fence Agent), dated 2009-10-20, and it belongs to the FENCE_AGENT(8) manual π go forth and fence responsibly, mwah π
β¨
π¦ where this page comes from
- centos-stream 10: fence-agents-mpath 4.16.0-36.el10 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- debian trixie: fence-agents-mpath 4.16.0-3 Β· GPL-2.0-or-later
- fedora 43: fence-agents-mpath 4.16.0-5.fc43 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 43: fence-agents-mpath 4.17.0-1.fc43 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 44: fence-agents-mpath 4.17.0-2.fc44 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- opensuse-leap 16.0: fence-agents-mpath 4.16.0+git.1750325058.755815b1-160000.2.2 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- ubuntu questing: fence-agents-mpath 4.16.0-3ubuntu1
- ubuntu resolute: fence-agents-mpath 4.17.0-1ubuntu1 Β· GPL-2.0-or-later
- ubuntu stonking: fence-agents-mpath 4.17.0-1ubuntu2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms