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
15 device(s). Reservation key is generated from "node id" (default) or
16 from "node name hash" (RECOMMENDED) by adjusting "key_value" option.
17 Using hash is recommended to prevent issues when removing nodes from
18 cluster without full cluster restart. Once registered, a single node
19 will become the reservation holder by creating a "write exclusive, reg‐
20 istrants only" reservation on the device(s). The result is that only
21 registered nodes may write to the device(s). When a node failure
22 occurs, the fence_scsi agent will remove the key belonging to the
23 failed node from the device(s). The failed node will no longer be able
24 to write to the 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
62 always 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 --retry-on=[attempts]
117 Count of attempts to retry power on (Default Value: 1)
118
119 --corosync-cmap-path=[path]
120 Path to corosync-cmapctl binary (Default Value:
121 /usr/sbin/corosync-cmapctl)
122
123 --key-value=<id|hash>
124 Method used to generate the SCSI key. "id" (default) uses the
125 positional ID from "corosync-cmactl nodelist" output which can
126 get inconsistent when nodes are removed from cluster without
127 full cluster restart. "hash" uses part of hash made out of node
128 names which is not affected over time but there is theoretical
129 chance that hashes can collide as size of SCSI key is quite lim‐
130 ited. (Default Value: id)
131
132 --sg_persist-path=[path]
133 Path to sg_persist binary (Default Value: /usr/bin/sg_persist)
134
135
136 --sg_turs-path=[path]
137 Path to sg_turs binary (Default Value: /usr/bin/sg_turs)
138
139 --vgs-path=[path]
140 Path to vgs binary (Default Value: /usr/sbin/vgs)
141
142
144
145
146 on Power on machine.
147
148 off Power off machine.
149
150 status This returns the status of the plug/virtual machine.
151
152 monitor
153 Check the health of fence device
154
155 metadata
156 Display the XML metadata describing this resource.
157
158 manpage
159 The operational behavior of this is not known.
160
161 validate-all
162 Validate if all required parameters are entered.
163
164
166
167
168 action Fencing action (Default Value: off)
169
170 aptpl Use the APTPL flag for registrations. This option is only used
171 for the 'on' action.
172
173 devices
174 List of devices to use for current operation. Devices can be
175 comma-separated list of raw devices (eg. /dev/sdc). Each device
176 must support SCSI-3 persistent reservations.
177
178 key Key to use for the current operation. This key should be unique
179 to a node. For the "on" action, the key specifies the key use to
180 register the local node. For the "off" action, this key speci‐
181 fies the key to be removed from the device(s).
182
183 plug Name of the node to be fenced. The node name is used to generate
184 the key value used for the current operation. This option will
185 be ignored when used with the -k option. This parameter is
186 always required. Obsoletes: port
187
188 readonly
189 Open DEVICE read-only.
190
191 logfile
192 Log output (stdout and stderr) to file
193
194 quiet Disable logging to stderr. Does not affect --verbose or --debug-
195 file or logging to syslog.
196
197 verbose
198 Verbose mode. Multiple -v flags can be stacked on the command
199 line (e.g., -vvv) to increase verbosity.
200
201 verbose_level
202 Level of debugging detail in output. Defaults to the number of
203 --verbose flags specified on the command line, or to 1 if ver‐
204 bose=1 in a stonith device configuration (i.e., on stdin).
205
206
207 debug_file
208 Write debug information to given file Obsoletes: debug
209
210 version
211 Display version information and exit
212
213 help Display help and exit
214
215 delay Wait X seconds before fencing is started (Default Value: 0)
216
217
218 disable_timeout
219 Disable timeout (true/false) (default: true when run from Pace‐
220 maker 2.0+)
221
222 login_timeout
223 Wait X seconds for cmd prompt after login (Default Value: 5)
224
225
226 power_timeout
227 Test X seconds for status change after ON/OFF (Default Value:
228 20)
229
230 power_wait
231 Wait X seconds after issuing ON/OFF (Default Value: 0)
232
233 shell_timeout
234 Wait X seconds for cmd prompt after issuing command (Default
235 Value: 3)
236
237 retry_on
238 Count of attempts to retry power on (Default Value: 1)
239
240 corosync_cmap_path
241 Path to corosync-cmapctl binary (Default Value:
242 /usr/sbin/corosync-cmapctl)
243
244 key_value
245 Method used to generate the SCSI key. "id" (default) uses the
246 positional ID from "corosync-cmactl nodelist" output which can
247 get inconsistent when nodes are removed from cluster without
248 full cluster restart. "hash" uses part of hash made out of node
249 names which is not affected over time but there is theoretical
250 chance that hashes can collide as size of SCSI key is quite lim‐
251 ited. (Default Value: id)
252
253 sg_persist_path
254 Path to sg_persist binary (Default Value: /usr/bin/sg_persist)
255
256
257 sg_turs_path
258 Path to sg_turs binary (Default Value: /usr/bin/sg_turs)
259
260 vgs_path
261 Path to vgs binary (Default Value: /usr/sbin/vgs)
262
263
264
265fence_scsi (Fence Agent) 2009-10-20 FENCE_AGENT(8)