FENCE_AGENT(8)
πΈ FENCE_AGENT(8) β bestie edition πΈ
okay so this is the system manager's manual page for fence_scsi, and I'm gonna walk you through it like we're texting at 2am, except every single fact stays exactly where it was. π
β¨ NAME β¨
fence_scsi β the fence agent for SCSI persistent reservation. that's it, that's the name, she's iconic π
π¦ DESCRIPTION π¦
okay so fence_scsi is an I/O Fencing agent that uses SCSI-3 persistent reservations to control access to shared storage devices. those devices have to support SCSI-3 persistent reservations (SPC-3 or greater) and the "preempt-and-abort" subcommand, no exceptions, they gotta be that girl.
so how does it work? each node in the cluster registers a unique key with the SCSI device(s). the reservation key gets generated from "node id" (that's the default) or from "node name hash" (RECOMMENDED, like actually do this one) by adjusting the "key_value" option. using hash is recommended so you don't get issues when removing nodes from the cluster without a full cluster restart. trust, it matters.
once registered, a single node becomes 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 happens, the fence_scsi agent removes the key belonging to the failed node from the device(s). the failed node can no longer write to the device(s). and bestieβ¦ a manual reboot is required. π
π«Ά when you're using it as a watchdog device, you can define stuff likeretry=1,retry-sleep=2andverbose=yesparameters in/etc/sysconfig/stonithif you have issues with it failing.
the fence agent accepts options on the command line as well as from stdin. fenced sends parameters through stdin when it execs the agent. and the agent can also be run by itself with command line options β super useful for testing and for turning outlets on or off from scripts. slay for automation honestly β¨
Vendor URL: (yeah it's blank, she's mysterious like that π)
π PARAMETERS π
-o,--action=[action]β the fencing action you want (Default Value:off)-a,--aptplβ use the APTPL flag for registrations. heads up, this option is only used for the'on'action π-d,--devices=[devices]β list of devices to use for the current operation. devices can be a comma or space separated list of raw devices (eg./dev/sdc). every single device must support SCSI-3 persistent reservations. this one's optional if the cluster is configured withclvmorlvmlockd-k,--key=[key]β the key to use for the current operation. this key should be unique to a node. for the"on"action, the key specifies the key used to register the local node. for the"off"action, this key specifies the key to be removed from the device(s)-n,--plug=[nodename]β name of the node to be fenced. the node name is used to generate the key value used for the current operation. this option will be ignored when used with the-koption. and this parameter is always required fr fr--readonlyβ open DEVICE read-only--suppress-errorsβ error log suppression-f,--logfileβ log output (stdout and stderr) to file-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)--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)--retry-on=[attempts]β count of attempts to retry power on (Default Value:1)--corosync-cmap-path=[path]β path tocorosync-cmapctlbinary (Default Value:/usr/sbin/corosync-cmapctl)--key-value=<id|hash>β the method used to generate the SCSI key."id"(default) uses the positional ID from"corosync-cmactl nodelist"output, which can get inconsistent when nodes are removed from the cluster without a full cluster restart."hash"uses part of a hash made out of node names, which is not affected over time, but there's a theoretical chance that hashes can collide since the size of the SCSI key is quite limited. (Default Value:id)--sg_persist-path=[path]β path tosg_persistbinary (Default Value:/usr/bin/sg_persist)--sg_turs-path=[path]β path tosg_tursbinary (Default Value:/usr/bin/sg_turs)--vgs-path=[path]β path tovgsbinary (Default Value:/usr/sbin/vgs)
β ACTIONS β
onβ power on machineoffβ power off machinestatusβ this returns the status of the plug/virtual machinemonitorβ check the health of fence device π©Ίmetadataβ display the XML metadata describing this resourcemanpageβ the operational behavior of this is not known (she's a mystery, we don't know her π)validate-allβ validate if all required parameters are entered
π STDIN PARAMETERS π
actionβ fencing action (Default Value:off)aptplβ use the APTPL flag for registrations. this option is only used for the'on'actiondevicesβ list of devices to use for the current operation. devices can be a comma or space separated list of raw devices (eg./dev/sdc). each device must support SCSI-3 persistent reservations. optional if the cluster is configured withclvmorlvmlockdkeyβ key to use for the current operation. this key should be unique to a node. for the"on"action, the key specifies the key used to register the local node. for the"off"action, this key specifies the key to be removed from the device(s)plugβ name of the node to be fenced. the node name is used to generate the key value used for the current operation. this option will be ignored when used with the-koption. this parameter is always required. Obsoletes:portreadonlyβ open DEVICE read-onlysuppress_errorsβ error log suppression. Obsoletes:suppress-errorslogfileβ log output (stdout and stderr) to filequietβ disable logging to stderr. does not affect--verboseor--debug-fileor logging to syslogverboseβ verbose mode. multiple-vflags can be stacked on the command line (e.g.,-vvv) to increase verbosityverbose_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)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)retry_onβ count of attempts to retry power on (Default Value:1)corosync_cmap_pathβ path tocorosync-cmapctlbinary (Default Value:/usr/sbin/corosync-cmapctl)key_valueβ method used to generate the SCSI key."id"(default) uses the positional ID from"corosync-cmactl nodelist"output which can get inconsistent when nodes are removed from cluster without full cluster restart."hash"uses part of hash made out of node names which is not affected over time but there is theoretical chance that hashes can collide as size of SCSI key is quite limited. (Default Value:id)sg_persist_pathβ path tosg_persistbinary (Default Value:/usr/bin/sg_persist)sg_turs_pathβ path tosg_tursbinary (Default Value:/usr/bin/sg_turs)vgs_pathβ path tovgsbinary (Default Value:/usr/sbin/vgs)
π§ and that's the whole page bestie, no skips, no skims, every flag accounted for π―
okay bye, this was fence_scsi (Fence Agent), dated 2009-10-20, from the FENCE_AGENT(8) manual β she's been serving looks since 2009 and she's still booked and busy ππβ¨
π¦ where this page comes from
- centos-stream 10: fence-agents-scsi 4.16.0-36.el10 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 43: fence-agents-scsi 4.16.0-5.fc43 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 43: fence-agents-scsi 4.17.0-1.fc43 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 44: fence-agents-scsi 4.17.0-2.fc44 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- opensuse-leap 16.0: fence-agents-scsi 4.16.0+git.1750325058.755815b1-160000.2.2 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms