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 --suppress-errors
68 Error log suppression.
69
70 -f, --logfile
71 Log output (stdout and stderr) to file
72
73 -q, --quiet
74 Disable logging to stderr. Does not affect --verbose or --debug-
75 file or logging to syslog.
76
77 -v, --verbose
78 Verbose mode. Multiple -v flags can be stacked on the command
79 line (e.g., -vvv) to increase verbosity.
80
81 --verbose-level
82 Level of debugging detail in output. Defaults to the number of
83 --verbose flags specified on the command line, or to 1 if ver‐
84 bose=1 in a stonith device configuration (i.e., on stdin).
85
86
87 -D, --debug-file=[debugfile]
88 Write debug information to given file
89
90 -V, --version
91 Display version information and exit
92
93 -h, --help
94 Display help and exit
95
96 --plug-separator=[char]
97 Separator for plug parameter when specifying more than 1 plug
98 (Default Value: ,)
99
100 --delay=[seconds]
101 Wait X seconds before fencing is started (Default Value: 0)
102
103
104 --disable-timeout=[true/false]
105 Disable timeout (true/false) (default: true when run from Pace‐
106 maker 2.0+)
107
108 --login-timeout=[seconds]
109 Wait X seconds for cmd prompt after login (Default Value: 5)
110
111
112 --power-timeout=[seconds]
113 Test X seconds for status change after ON/OFF (Default Value:
114 20)
115
116 --power-wait=[seconds]
117 Wait X seconds after issuing ON/OFF (Default Value: 0)
118
119 --shell-timeout=[seconds]
120 Wait X seconds for cmd prompt after issuing command (Default
121 Value: 3)
122
123 --stonith-status-sleep=[seconds]
124 Sleep X seconds between status calls during a STONITH action
125 (Default Value: 1)
126
127 --retry-on=[attempts]
128 Count of attempts to retry power on (Default Value: 1)
129
130 --corosync-cmap-path=[path]
131 Path to corosync-cmapctl binary (Default Value:
132 /usr/sbin/corosync-cmapctl)
133
134 --key-value=<id|hash>
135 Method used to generate the SCSI key. "id" (default) uses the
136 positional ID from "corosync-cmactl nodelist" output which can
137 get inconsistent when nodes are removed from cluster without
138 full cluster restart. "hash" uses part of hash made out of node
139 names which is not affected over time but there is theoretical
140 chance that hashes can collide as size of SCSI key is quite lim‐
141 ited. (Default Value: id)
142
143 --sg_persist-path=[path]
144 Path to sg_persist binary (Default Value: /usr/bin/sg_persist)
145
146
147 --sg_turs-path=[path]
148 Path to sg_turs binary (Default Value: /usr/bin/sg_turs)
149
150 --vgs-path=[path]
151 Path to vgs binary (Default Value: /usr/sbin/vgs)
152
153
155
156
157 on Power on machine.
158
159 off Power off machine.
160
161 status This returns the status of the plug/virtual machine.
162
163 monitor
164 Check the health of fence device
165
166 metadata
167 Display the XML metadata describing this resource.
168
169 manpage
170 The operational behavior of this is not known.
171
172 validate-all
173 Validate if all required parameters are entered.
174
175
177
178
179 action Fencing action (Default Value: off)
180
181 aptpl Use the APTPL flag for registrations. This option is only used
182 for the 'on' action.
183
184 devices
185 List of devices to use for current operation. Devices can be
186 comma-separated list of raw devices (eg. /dev/sdc). Each device
187 must support SCSI-3 persistent reservations.
188
189 key Key to use for the current operation. This key should be unique
190 to a node. For the "on" action, the key specifies the key use to
191 register the local node. For the "off" action, this key speci‐
192 fies the key to be removed from the device(s).
193
194 plug Name of the node to be fenced. The node name is used to generate
195 the key value used for the current operation. This option will
196 be ignored when used with the -k option. This parameter is al‐
197 ways required. Obsoletes: port
198
199 readonly
200 Open DEVICE read-only.
201
202 suppress_errors
203 Error log suppression. Obsoletes: suppress-errors
204
205 logfile
206 Log output (stdout and stderr) to file
207
208 quiet Disable logging to stderr. Does not affect --verbose or --debug-
209 file or logging to syslog.
210
211 verbose
212 Verbose mode. Multiple -v flags can be stacked on the command
213 line (e.g., -vvv) to increase verbosity.
214
215 verbose_level
216 Level of debugging detail in output. Defaults to the number of
217 --verbose flags specified on the command line, or to 1 if ver‐
218 bose=1 in a stonith device configuration (i.e., on stdin).
219
220
221 debug_file
222 Write debug information to given file Obsoletes: debug
223
224 version
225 Display version information and exit
226
227 help Display help and exit
228
229 plug_separator
230 Separator for plug parameter when specifying more than 1 plug
231 (Default Value: ,)
232
233 delay Wait X seconds before fencing is started (Default Value: 0)
234
235
236 disable_timeout
237 Disable timeout (true/false) (default: true when run from Pace‐
238 maker 2.0+)
239
240 login_timeout
241 Wait X seconds for cmd prompt after login (Default Value: 5)
242
243
244 power_timeout
245 Test X seconds for status change after ON/OFF (Default Value:
246 20)
247
248 power_wait
249 Wait X seconds after issuing ON/OFF (Default Value: 0)
250
251 shell_timeout
252 Wait X seconds for cmd prompt after issuing command (Default
253 Value: 3)
254
255 stonith_status_sleep
256 Sleep X seconds between status calls during a STONITH action
257 (Default Value: 1)
258
259 retry_on
260 Count of attempts to retry power on (Default Value: 1)
261
262 corosync_cmap_path
263 Path to corosync-cmapctl binary (Default Value:
264 /usr/sbin/corosync-cmapctl)
265
266 key_value
267 Method used to generate the SCSI key. "id" (default) uses the
268 positional ID from "corosync-cmactl nodelist" output which can
269 get inconsistent when nodes are removed from cluster without
270 full cluster restart. "hash" uses part of hash made out of node
271 names which is not affected over time but there is theoretical
272 chance that hashes can collide as size of SCSI key is quite lim‐
273 ited. (Default Value: id)
274
275 sg_persist_path
276 Path to sg_persist binary (Default Value: /usr/bin/sg_persist)
277
278
279 sg_turs_path
280 Path to sg_turs binary (Default Value: /usr/bin/sg_turs)
281
282 vgs_path
283 Path to vgs binary (Default Value: /usr/sbin/vgs)
284
285
286
287fence_scsi (Fence Agent) 2009-10-20 FENCE_AGENT(8)