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 like retry=1, retry-sleep=2 and verbose=yes parameters in /etc/sysconfig/stonith if 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 with clvm or lvmlockd
  • -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 -k option. 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 --verbose or --debug-file or logging to syslog
  • -v, --verbose β€” verbose mode. multiple -v flags 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 --verbose flags specified on the command line, or to 1 if verbose=1 in 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: true when 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 to corosync-cmapctl binary (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 to sg_persist binary (Default Value: /usr/bin/sg_persist)
  • --sg_turs-path=[path] β€” path to sg_turs binary (Default Value: /usr/bin/sg_turs)
  • --vgs-path=[path] β€” path to vgs binary (Default Value: /usr/sbin/vgs)

⭐ 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 device 🩺
  • metadata β€” display the XML metadata describing this resource
  • manpage β€” 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' action
  • 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). each device must support SCSI-3 persistent reservations. optional if the cluster is configured with clvm or lvmlockd
  • key β€” 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 -k option. this parameter is always required. Obsoletes: port
  • readonly β€” open DEVICE read-only
  • suppress_errors β€” error log suppression. Obsoletes: suppress-errors
  • logfile β€” log output (stdout and stderr) to file
  • quiet β€” disable logging to stderr. does not affect --verbose or --debug-file or logging to syslog
  • verbose β€” verbose mode. multiple -v flags 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 --verbose flags specified on the command line, or to 1 if verbose=1 in a stonith device configuration (i.e., on stdin)
  • debug_file β€” write debug information to given file. Obsoletes: debug
  • version β€” display version information and exit
  • help β€” display help and exit
  • plug_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: true when 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 to corosync-cmapctl binary (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 to sg_persist binary (Default Value: /usr/bin/sg_persist)
  • sg_turs_path β€” path to sg_turs binary (Default Value: /usr/bin/sg_turs)
  • vgs_path β€” path to vgs binary (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