1
2FENCE_AGENT(8)              System Manager's Manual             FENCE_AGENT(8)
3
4
5

NAME

7       fence_scsi - Fence agent for SCSI persistent reservation
8

DESCRIPTION

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

PARAMETERS

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 or space separated list of  raw  devices  (eg.  /dev/sdc).
50              Each  device  must  support  SCSI-3 persistent reservations. Op‐
51              tional if cluster is configured with clvm or lvmlockd.
52
53       -k, --key=[key]
54              Key to use for the current operation. This key should be  unique
55              to a node. For the "on" action, the key specifies the key use to
56              register the local node. For the "off" action, this  key  speci‐
57              fies the key to be removed from the device(s).
58
59       -n, --plug=[nodename]
60              Name of the node to be fenced. The node name is used to generate
61              the key value used for the current operation. This  option  will
62              be  ignored  when used with the -k option. This parameter is al‐
63              ways required.
64
65       --readonly
66              Open DEVICE read-only.
67
68       --suppress-errors
69              Error log suppression.
70
71       -f, --logfile
72              Log output (stdout and stderr) to file
73
74       -q, --quiet
75              Disable logging to stderr. Does not affect --verbose or --debug-
76              file or logging to syslog.
77
78       -v, --verbose
79              Verbose  mode.  Multiple  -v flags can be stacked on the command
80              line (e.g., -vvv) to increase verbosity.
81
82       --verbose-level
83              Level of debugging detail in output. Defaults to the  number  of
84              --verbose  flags  specified on the command line, or to 1 if ver‐
85              bose=1 in a  stonith  device  configuration  (i.e.,  on  stdin).
86
87
88       -D, --debug-file=[debugfile]
89              Write debug information to given file
90
91       -V, --version
92              Display version information and exit
93
94       -h, --help
95              Display help and exit
96
97       --plug-separator=[char]
98              Separator  for  plug  parameter when specifying more than 1 plug
99              (Default Value: ,)
100
101       --delay=[seconds]
102              Wait X seconds before fencing  is  started  (Default  Value:  0)
103
104
105       --disable-timeout=[true/false]
106              Disable  timeout (true/false) (default: true when run from Pace‐
107              maker 2.0+)
108
109       --login-timeout=[seconds]
110              Wait X seconds for cmd prompt after  login  (Default  Value:  5)
111
112
113       --power-timeout=[seconds]
114              Test  X  seconds  for status change after ON/OFF (Default Value:
115              20)
116
117       --power-wait=[seconds]
118              Wait X seconds after issuing ON/OFF (Default Value: 0)
119
120       --shell-timeout=[seconds]
121              Wait X seconds for cmd prompt  after  issuing  command  (Default
122              Value: 3)
123
124       --stonith-status-sleep=[seconds]
125              Sleep  X  seconds  between  status calls during a STONITH action
126              (Default Value: 1)
127
128       --retry-on=[attempts]
129              Count of attempts to retry power on (Default Value: 1)
130
131       --corosync-cmap-path=[path]
132              Path    to    corosync-cmapctl    binary     (Default     Value:
133              /usr/sbin/corosync-cmapctl)
134
135       --key-value=<id|hash>
136              Method  used  to  generate the SCSI key. "id" (default) uses the
137              positional ID from "corosync-cmactl nodelist" output  which  can
138              get  inconsistent  when  nodes  are removed from cluster without
139              full cluster restart. "hash" uses part of hash made out of  node
140              names  which  is not affected over time but there is theoretical
141              chance that hashes can collide as size of SCSI key is quite lim‐
142              ited. (Default Value: id)
143
144       --sg_persist-path=[path]
145              Path  to  sg_persist binary (Default Value: /usr/bin/sg_persist)
146
147
148       --sg_turs-path=[path]
149              Path to sg_turs binary (Default Value: /usr/bin/sg_turs)
150
151       --vgs-path=[path]
152              Path to vgs binary (Default Value: /usr/sbin/vgs)
153
154

ACTIONS

156
157
158       on     Power on machine.
159
160       off    Power off machine.
161
162       status This returns the status of the plug/virtual machine.
163
164       monitor
165              Check the health of fence device
166
167       metadata
168              Display the XML metadata describing this resource.
169
170       manpage
171               The operational behavior of this is not known.
172
173       validate-all
174              Validate if all required parameters are entered.
175
176

STDIN PARAMETERS

178
179
180       action Fencing action (Default Value: off)
181
182       aptpl  Use the APTPL flag for registrations. This option is  only  used
183              for the 'on' action.
184
185       devices
186              List  of  devices  to  use for current operation. Devices can be
187              comma or space separated list of  raw  devices  (eg.  /dev/sdc).
188              Each  device  must  support  SCSI-3 persistent reservations. Op‐
189              tional if cluster is configured with clvm or lvmlockd.
190
191       key    Key to use for the current operation. This key should be  unique
192              to a node. For the "on" action, the key specifies the key use to
193              register the local node. For the "off" action, this  key  speci‐
194              fies the key to be removed from the device(s).
195
196       plug   Name of the node to be fenced. The node name is used to generate
197              the key value used for the current operation. This  option  will
198              be  ignored  when used with the -k option. This parameter is al‐
199              ways required. Obsoletes: port
200
201       readonly
202              Open DEVICE read-only.
203
204       suppress_errors
205              Error log suppression. Obsoletes: suppress-errors
206
207       logfile
208              Log output (stdout and stderr) to file
209
210       quiet  Disable logging to stderr. Does not affect --verbose or --debug-
211              file or logging to syslog.
212
213       verbose
214              Verbose  mode.  Multiple  -v flags can be stacked on the command
215              line (e.g., -vvv) to increase verbosity.
216
217       verbose_level
218              Level of debugging detail in output. Defaults to the  number  of
219              --verbose  flags  specified on the command line, or to 1 if ver‐
220              bose=1 in a  stonith  device  configuration  (i.e.,  on  stdin).
221
222
223       debug_file
224              Write debug information to given file Obsoletes: debug
225
226       version
227              Display version information and exit
228
229       help   Display help and exit
230
231       plug_separator
232              Separator  for  plug  parameter when specifying more than 1 plug
233              (Default Value: ,)
234
235       delay  Wait X seconds before fencing  is  started  (Default  Value:  0)
236
237
238       disable_timeout
239              Disable  timeout (true/false) (default: true when run from Pace‐
240              maker 2.0+)
241
242       login_timeout
243              Wait X seconds for cmd prompt after  login  (Default  Value:  5)
244
245
246       power_timeout
247              Test  X  seconds  for status change after ON/OFF (Default Value:
248              20)
249
250       power_wait
251              Wait X seconds after issuing ON/OFF (Default Value: 0)
252
253       shell_timeout
254              Wait X seconds for cmd prompt  after  issuing  command  (Default
255              Value: 3)
256
257       stonith_status_sleep
258              Sleep  X  seconds  between  status calls during a STONITH action
259              (Default Value: 1)
260
261       retry_on
262              Count of attempts to retry power on (Default Value: 1)
263
264       corosync_cmap_path
265              Path    to    corosync-cmapctl    binary     (Default     Value:
266              /usr/sbin/corosync-cmapctl)
267
268       key_value
269              Method  used  to  generate the SCSI key. "id" (default) uses the
270              positional ID from "corosync-cmactl nodelist" output  which  can
271              get  inconsistent  when  nodes  are removed from cluster without
272              full cluster restart. "hash" uses part of hash made out of  node
273              names  which  is not affected over time but there is theoretical
274              chance that hashes can collide as size of SCSI key is quite lim‐
275              ited. (Default Value: id)
276
277       sg_persist_path
278              Path  to  sg_persist binary (Default Value: /usr/bin/sg_persist)
279
280
281       sg_turs_path
282              Path to sg_turs binary (Default Value: /usr/bin/sg_turs)
283
284       vgs_path
285              Path to vgs binary (Default Value: /usr/sbin/vgs)
286
287
288
289fence_scsi (Fence Agent)          2009-10-20                    FENCE_AGENT(8)
Impressum