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

NAME

7       fence_scsi - I/O fencing agent for SCSI persistent reservations
8
9

SYNOPSIS

11       fence_scsi [OPTION]...
12
13

DESCRIPTION

15       fence_scsi  is  an  I/O  fencing  agent which can be used with the SCSI
16       devices that support persistent reservations (SPC-2 or greater).
17
18       SCSI persistent reservations work by having each node  in  the  cluster
19       register  with the SCSI device. Registration is done using a unique key
20       (based on the node's IP address). Each node that will perform I/O oper‐
21       ations  to  the  shared  storage must register with the device. This is
22       done at system startup with the scsi_reserve init script.  This  script
23       will  discover  all  clustered  volumes  as well as the underlying SCSI
24       device(s). Device discovery is done via the lvs  command  (see  lvs(8))
25       and is subject to any filtering rules defined in the lvm.conf file.
26
27       After  generating  the  node's unique key, the script will register the
28       node with the SCSI device(s) that were discovered.  Once  the  node  is
29       registered,  the  script  will  attempt to create a reservation. Unlike
30       registrations, of which there are multiple registrants  (one  for  each
31       node in the cluster), there is only one reservation holder. If a reser‐
32       vation does not already exist for a device, the script  will  create  a
33       reservation using the node's unique key.
34
35       It  is important to distinguish between registrations and reservations.
36       As mentioned above, each node that will perform I/O operations  to  the
37       SCSI  device  must register. As a result, there will be multiple regis‐
38       trations for a given SCSI device. In contrast, there can  only  be  one
39       reservation  per  SCSI device. It is not important which node holds the
40       reservation. The reservation simply tells the  device  how  the  regis‐
41       trants are allowed to access the device. For our purposes, the reserva‐
42       tion type is "write exclusive, registrants only".  With  this  reserva‐
43       tion type, only registered nodes will be able to write to the device.
44
45       When  the  cluster must fence a node, it simply revokes a node's regis‐
46       tration, or "unregisters" the node. This operation also uses the node's
47       unique  key.  By  deriving the unique key based on the errant node's IP
48       address, the cluster can "unregister" the key. As a result, the  errant
49       node will no longer be able to write to the SCSI device.
50
51       Note that the node that holds the reservation for a device must also be
52       registered with that device. When the situation arises where  the  node
53       that  is  being  fenced is also the reservation holder, the reservation
54       must be moved. This is handled by using the "preempt-and-abort command"
55       which  will transfer the reservation from the node that is being fenced
56       to the node that is performing the fencing. This operation  will  main‐
57       tain the reservation while "unregistering" the node being fenced.
58
59       At  system  shutdown, the scsi_reserve script will attempt to "unregis‐
60       ter" the node from all devices. The exception is when the node  happens
61       to  be  the  reservation holder. In this case, the script does nothing,
62       due to the fact that there may be other nodes using the device and  the
63       reservation must remain intact.
64
65       fence_scsi  accepts  options on the command line as well as from stdin.
66       fenced  sends  parameters  through  stdin  when  it  execs  the  agent.
67       fence_scsi  can  be  run  by itself with command line options.  This is
68       useful for testing and for turning outlets on or off from scripts.
69
70

OPTIONS

72       -n node
73              Name of the node to be fenced.
74
75       -h     Print out a help  message  describing  available  options,  then
76              exit.
77
78       -s self
79              Name of the node that will perform the fencing operation.
80
81       -v     Verbose output.
82
83       -V     Print out a version message, then exit.
84
85

STDIN PARAMETERS

87       agent = < param >
88              This   option  is  used  by  fence_node(8)  and  is  ignored  by
89              fence_scsi.
90
91       nodename = < hostname | ip >
92              Name of the node to be fenced.
93
94       self = < nodename >
95              Name of the node that will perform the fencing operation.
96
97       verbose = < param >
98              Verbose output.
99
100

SEE ALSO

102       fence(8), fence_node(8), sg_persist(8), lvs(8), lvm.conf(5)
103
104
105
106                                                                 fence_scsi(8)
Impressum