1
2FENCE_AGENT(8) System Manager's Manual FENCE_AGENT(8)
3
4
5
7 fence_scsi - Fence agent for SCSI persistent reservation
8
10 fence_scsi is an I/O fencing agent that uses SCSI-3 persistent reserva‐
11 tions to control access to shared storage devices. These devices must
12 support SCSI-3 persistent reservations (SPC-3 or greater) as well as
13 the "preempt-and-abort" subcommand. The fence_scsi agent works by hav‐
14 ing each node in the cluster register a unique key with the SCSI de‐
15 vice(s). Reservation key is generated from "node id" (default) or from
16 "node name hash" (RECOMMENDED) by adjusting "key_value" option. Using
17 hash is recommended to prevent issues when removing nodes from cluster
18 without full cluster restart. Once registered, a single node will be‐
19 come the reservation holder by creating a "write exclusive, registrants
20 only" reservation on the device(s). The result is that only registered
21 nodes may write to the device(s). When a node failure occurs, the
22 fence_scsi agent will remove the key belonging to the failed node from
23 the device(s). The failed node will no longer be able to write to the
24 device(s). A manual reboot is required.
25
26 When used as a watchdog device you can define e.g. retry=1, retry-
27 sleep=2 and verbose=yes parameters in /etc/sysconfig/stonith if you
28 have issues with it failing.
29
30 fence_scsi accepts options on the command line as well as from stdin.
31 Fenced sends parameters through stdin when it execs the agent.
32 fence_scsi can be run by itself with command line options. This is
33 useful for testing and for turning outlets on or off from scripts.
34
35 Vendor URL:
36
38
39
40 -o, --action=[action]
41 Fencing action (Default Value: off)
42
43 -a, --aptpl
44 Use the APTPL flag for registrations. This option is only used
45 for the 'on' action.
46
47 -d, --devices=[devices]
48 List of devices to use for current operation. Devices can be
49 comma-separated list of raw devices (eg. /dev/sdc). Each device
50 must support SCSI-3 persistent reservations.
51
52 -k, --key=[key]
53 Key to use for the current operation. This key should be unique
54 to a node. For the "on" action, the key specifies the key use to
55 register the local node. For the "off" action, this key speci‐
56 fies the key to be removed from the device(s).
57
58 -n, --plug=[nodename]
59 Name of the node to be fenced. The node name is used to generate
60 the key value used for the current operation. This option will
61 be ignored when used with the -k option. This parameter is al‐
62 ways required.
63
64 --readonly
65 Open DEVICE read-only.
66
67 -f, --logfile
68 Log output (stdout and stderr) to file
69
70 -q, --quiet
71 Disable logging to stderr. Does not affect --verbose or --debug-
72 file or logging to syslog.
73
74 -v, --verbose
75 Verbose mode. Multiple -v flags can be stacked on the command
76 line (e.g., -vvv) to increase verbosity.
77
78 --verbose-level
79 Level of debugging detail in output. Defaults to the number of
80 --verbose flags specified on the command line, or to 1 if ver‐
81 bose=1 in a stonith device configuration (i.e., on stdin).
82
83
84 -D, --debug-file=[debugfile]
85 Write debug information to given file
86
87 -V, --version
88 Display version information and exit
89
90 -h, --help
91 Display help and exit
92
93 --delay=[seconds]
94 Wait X seconds before fencing is started (Default Value: 0)
95
96
97 --disable-timeout=[true/false]
98 Disable timeout (true/false) (default: true when run from Pace‐
99 maker 2.0+)
100
101 --login-timeout=[seconds]
102 Wait X seconds for cmd prompt after login (Default Value: 5)
103
104
105 --power-timeout=[seconds]
106 Test X seconds for status change after ON/OFF (Default Value:
107 20)
108
109 --power-wait=[seconds]
110 Wait X seconds after issuing ON/OFF (Default Value: 0)
111
112 --shell-timeout=[seconds]
113 Wait X seconds for cmd prompt after issuing command (Default
114 Value: 3)
115
116 --stonith-status-sleep=[seconds]
117 Sleep X seconds between status calls during a STONITH action
118 (Default Value: 1)
119
120 --retry-on=[attempts]
121 Count of attempts to retry power on (Default Value: 1)
122
123 --corosync-cmap-path=[path]
124 Path to corosync-cmapctl binary (Default Value:
125 /usr/sbin/corosync-cmapctl)
126
127 --key-value=<id|hash>
128 Method used to generate the SCSI key. "id" (default) uses the
129 positional ID from "corosync-cmactl nodelist" output which can
130 get inconsistent when nodes are removed from cluster without
131 full cluster restart. "hash" uses part of hash made out of node
132 names which is not affected over time but there is theoretical
133 chance that hashes can collide as size of SCSI key is quite lim‐
134 ited. (Default Value: id)
135
136 --sg_persist-path=[path]
137 Path to sg_persist binary (Default Value: /usr/bin/sg_persist)
138
139
140 --sg_turs-path=[path]
141 Path to sg_turs binary (Default Value: /usr/bin/sg_turs)
142
143 --vgs-path=[path]
144 Path to vgs binary (Default Value: /usr/sbin/vgs)
145
146
148
149
150 on Power on machine.
151
152 off Power off machine.
153
154 status This returns the status of the plug/virtual machine.
155
156 monitor
157 Check the health of fence device
158
159 metadata
160 Display the XML metadata describing this resource.
161
162 manpage
163 The operational behavior of this is not known.
164
165 validate-all
166 Validate if all required parameters are entered.
167
168
170
171
172 action Fencing action (Default Value: off)
173
174 aptpl Use the APTPL flag for registrations. This option is only used
175 for the 'on' action.
176
177 devices
178 List of devices to use for current operation. Devices can be
179 comma-separated list of raw devices (eg. /dev/sdc). Each device
180 must support SCSI-3 persistent reservations.
181
182 key Key to use for the current operation. This key should be unique
183 to a node. For the "on" action, the key specifies the key use to
184 register the local node. For the "off" action, this key speci‐
185 fies the key to be removed from the device(s).
186
187 plug Name of the node to be fenced. The node name is used to generate
188 the key value used for the current operation. This option will
189 be ignored when used with the -k option. This parameter is al‐
190 ways required. Obsoletes: port
191
192 readonly
193 Open DEVICE read-only.
194
195 logfile
196 Log output (stdout and stderr) to file
197
198 quiet Disable logging to stderr. Does not affect --verbose or --debug-
199 file or logging to syslog.
200
201 verbose
202 Verbose mode. Multiple -v flags can be stacked on the command
203 line (e.g., -vvv) to increase verbosity.
204
205 verbose_level
206 Level of debugging detail in output. Defaults to the number of
207 --verbose flags specified on the command line, or to 1 if ver‐
208 bose=1 in a stonith device configuration (i.e., on stdin).
209
210
211 debug_file
212 Write debug information to given file Obsoletes: debug
213
214 version
215 Display version information and exit
216
217 help Display help and exit
218
219 delay Wait X seconds before fencing is started (Default Value: 0)
220
221
222 disable_timeout
223 Disable timeout (true/false) (default: true when run from Pace‐
224 maker 2.0+)
225
226 login_timeout
227 Wait X seconds for cmd prompt after login (Default Value: 5)
228
229
230 power_timeout
231 Test X seconds for status change after ON/OFF (Default Value:
232 20)
233
234 power_wait
235 Wait X seconds after issuing ON/OFF (Default Value: 0)
236
237 shell_timeout
238 Wait X seconds for cmd prompt after issuing command (Default
239 Value: 3)
240
241 stonith_status_sleep
242 Sleep X seconds between status calls during a STONITH action
243 (Default Value: 1)
244
245 retry_on
246 Count of attempts to retry power on (Default Value: 1)
247
248 corosync_cmap_path
249 Path to corosync-cmapctl binary (Default Value:
250 /usr/sbin/corosync-cmapctl)
251
252 key_value
253 Method used to generate the SCSI key. "id" (default) uses the
254 positional ID from "corosync-cmactl nodelist" output which can
255 get inconsistent when nodes are removed from cluster without
256 full cluster restart. "hash" uses part of hash made out of node
257 names which is not affected over time but there is theoretical
258 chance that hashes can collide as size of SCSI key is quite lim‐
259 ited. (Default Value: id)
260
261 sg_persist_path
262 Path to sg_persist binary (Default Value: /usr/bin/sg_persist)
263
264
265 sg_turs_path
266 Path to sg_turs binary (Default Value: /usr/bin/sg_turs)
267
268 vgs_path
269 Path to vgs binary (Default Value: /usr/sbin/vgs)
270
271
272
273fence_scsi (Fence Agent) 2009-10-20 FENCE_AGENT(8)