Scroll to navigation

FENCE_AGENT(8) System Manager's Manual FENCE_AGENT(8)

NAME

fence_scsi - Fence agent for SCSI persistent reservation

DESCRIPTION

fence_scsi is an I/O fencing agent that uses SCSI-3 persistent reservations to control access to shared storage devices. These devices must support SCSI-3 persistent reservations (SPC-3 or greater) as well as the "preempt-and-abort" subcommand. The fence_scsi agent works by having each node in the cluster register a unique key with the SCSI device(s). Reservation key is generated from "node id" (default) or from "node name hash" (RECOMMENDED) by adjusting "key_value" option. Using hash is recommended to prevent issues when removing nodes from cluster without full cluster restart. Once registered, a single node will become the reservation holder by creating a "write exclusive, registrants only" reservation on the device(s). The result is that only registered nodes may write to the device(s). When a node failure occurs, the fence_scsi 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=2 and verbose=yes parameters in /etc/sysconfig/stonith if you have issues with it failing.

fence_scsi accepts options on the command line as well as from stdin. Fenced sends parameters through stdin when it execs the agent. fence_scsi can be run by itself with command line options. This is useful for testing and for turning outlets on or off from scripts.

Vendor URL:

PARAMETERS

Fencing action (Default Value: off)
Use the APTPL flag for registrations. This option is only used for the 'on' action.
List of devices to use for current operation. Devices can be comma-separated list of raw devices (eg. /dev/sdc). Each device must support SCSI-3 persistent reservations.
Key to use for the current operation. This key should be unique to a node. 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).
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.
Open DEVICE read-only.
Error log suppression.
Log output (stdout and stderr) to file
Disable logging to stderr. Does not affect --verbose or --debug-file or logging to syslog.
Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity.
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).
Write debug information to given file
Display version information and exit
Display help and exit
Separator for plug parameter when specifying more than 1 plug (Default Value: ,)
Wait X seconds before fencing is started (Default Value: 0)
Disable timeout (true/false) (default: true when run from Pacemaker 2.0+)
Wait X seconds for cmd prompt after login (Default Value: 5)
Test X seconds for status change after ON/OFF (Default Value: 20)
Wait X seconds after issuing ON/OFF (Default Value: 0)
Wait X seconds for cmd prompt after issuing command (Default Value: 3)
Sleep X seconds between status calls during a STONITH action (Default Value: 1)
Count of attempts to retry power on (Default Value: 1)
Path to corosync-cmapctl binary (Default Value: /usr/sbin/corosync-cmapctl)
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)
Path to sg_persist binary (Default Value: /usr/bin/sg_persist)
Path to sg_turs binary (Default Value: /usr/bin/sg_turs)
Path to vgs binary (Default Value: /sbin/vgs)

ACTIONS

Power on machine.
Power off machine.
This returns the status of the plug/virtual machine.
Check the health of fence device
Display the XML metadata describing this resource.

The operational behavior of this is not known.
Validate if all required parameters are entered.

STDIN PARAMETERS

Fencing action (Default Value: off)
Use the APTPL flag for registrations. This option is only used for the 'on' action.
List of devices to use for current operation. Devices can be comma-separated list of raw devices (eg. /dev/sdc). Each device must support SCSI-3 persistent reservations.
Key to use for the current operation. This key should be unique to a node. 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).
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
Open DEVICE read-only.
Error log suppression. Obsoletes: suppress-errors
Log output (stdout and stderr) to file
Disable logging to stderr. Does not affect --verbose or --debug-file or logging to syslog.
Verbose mode. Multiple -v flags can be stacked on the command line (e.g., -vvv) to increase verbosity.
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).
Write debug information to given file Obsoletes: debug
Display version information and exit
Display help and exit
Separator for plug parameter when specifying more than 1 plug (Default Value: ,)
Wait X seconds before fencing is started (Default Value: 0)
Disable timeout (true/false) (default: true when run from Pacemaker 2.0+)
Wait X seconds for cmd prompt after login (Default Value: 5)
Test X seconds for status change after ON/OFF (Default Value: 20)
Wait X seconds after issuing ON/OFF (Default Value: 0)
Wait X seconds for cmd prompt after issuing command (Default Value: 3)
Sleep X seconds between status calls during a STONITH action (Default Value: 1)
Count of attempts to retry power on (Default Value: 1)
Path to corosync-cmapctl binary (Default Value: /usr/sbin/corosync-cmapctl)
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)
Path to sg_persist binary (Default Value: /usr/bin/sg_persist)
Path to sg_turs binary (Default Value: /usr/bin/sg_turs)
Path to vgs binary (Default Value: /sbin/vgs)
2009-10-20 fence_scsi (Fence Agent)