1SRP_DAEMON(1)                    USER COMMANDS                   SRP_DAEMON(1)
2
3
4

NAME

6       srp_daemon - Discovers SRP targets in an InfiniBand Fabric
7
8

SYNOPSIS

10       srp_daemon  [-vVcaeon] [-d umad-device | -i infiniband-device [-p port-
11       num] | -j dev:port] [-t timeout(ms)] [-r retries] [-R rescan-time]  [-f
12       rules-file]
13
14
15

DESCRIPTION

17       Discovers  and  connects to InfiniBand SCSI RDMA Protocol (SRP) targets
18       in an IB fabric.
19
20       Each srp_daemon instance operates on one local port. Upon boot it  per‐
21       forms  a  full  rescan  of  the fabric and then waits for an srp_daemon
22       event. An srp_daemon event can be a join of a new machine to  the  fab‐
23       ric,  a  change  in  the capabilities of a machine, an SA change, or an
24       expiration of a predefined timeout.
25
26       When a new machine joins the fabric, srp_daemon checks if it is an  SRP
27       target.  When  there  is a change of capabilities, srp_daemon checks if
28       the machine has turned into an SRP target. When there is an  SA  change
29       or  a timeout expiration, srp_daemon performs a full rescan of the fab‐
30       ric.
31
32       For each target srp_daemon finds, it checks if  it  should  connect  to
33       this  target  according  to  its  rules  (the  default  rules  file  is
34       /etc/srp_daemon.conf) and if it is already connected to the local port.
35       If  it  should  connect  to this target and if it is not connected yet,
36       srp_daemon can either print the target details or connect to it.
37
38

OPTIONS

40       -v     Print more verbose output
41
42       -V     Print even more verbose output (debug mode)
43
44       -i infiniband-device
45              Work on infiniband-device. This option should not be  used  with
46              -d nor with -j.
47
48       -p port-num
49              Work on port port-num (default 1). This option must be used with
50              -i and should not be used with -d nor with -j.
51
52       -j dev:port
53              Work on port number port of InfiniBand device dev.  This  option
54              should not be used with -d, -i nor with -p.
55
56       -d umad-device
57              Use device file umad-device (default /dev/infiniband/umad0) This
58              option should not be used with -i, -p nor with -j.
59
60       -c     Generate   output   suitable   for   piping   directly   to    a
61              /sys/class/infiniband_srp/srp-<device>-<port>/add_target file.
62
63       -a     Prints  all the targets in the fabric, not only targets that are
64              not connected through the local port. This is the same  behavior
65              as that of ibsrpdm.
66
67       -e     Execute the connection command, i.e., make the connection to the
68              target.
69
70       -o     Perform only one rescan and exit just like ibsrpdm.
71
72       -R rescan-time
73              Force a complete rescan every rescan-time seconds. If -R is  not
74              specified, no timeout rescans will be performed.
75
76       -T retry-timeout
77              Retries  to  connect to existing target after retry-timeout sec‐
78              onds. If -R is not specified, uses 5 Seconds timeout. if  retry-
79              timeout  is  0, will not try to reconnect. The reason srp_daemon
80              retries to connect to the target is because there may be a  rare
81              scnerio  in which srp_daemon will try to connect to add a target
82              when the target is about to be removed, but is not removed yet.
83
84       -f rules-file
85              Decide to which targets to connect according  to  the  rules  in
86              rules-file.  If -f is not specified, uses the default rules file
87              /etc/srp_daemon.conf.  Each line in the  rules-file  is  a  rule
88              which can be either an allow connection or a disallow connection
89              according to the first character in the line  (a  or  d  accord‐
90              ingly).  The  rest  of  the line is values for id_ext, ioc_guid,
91              dgid, service_id. Please take a look at the example section  for
92              an  example  of  the file. srp_daemon decide whether to allow or
93              disallow each target according  to first  rule  that  match  the
94              target. If no rule matches the target, the target is allowed and
95              will be connected. In an  allow  rule  it  is  possible  to  set
96              attributes   for   the   connection  to  the  target.  Supported
97              attributes are max_cmd_per_lun and max_sect.
98
99       -t timeout
100              Use timeout of timeout msec for MAD responses (default: 5 sec).
101
102       -r retries
103              Perform  retries  retries  on  each  send  to  MAD  (default:  3
104              retries).
105
106       -n     New format - use also initiator_ext in the connection command.
107
108       --systemd
109              Enable systemd integration.
110
111

FILES

113       /etc/srp_daemon.conf  - Default rules configuration file that indicates
114       to which targets to connect. Can be overridden using the -f  rules-file
115       option.   Each line in this file is a rule which can be either an allow
116       connection or a disallow connection according to the first character in
117       the  line  (a  or  d  accordingly).  The rest of the line is values for
118       id_ext, ioc_guid, dgid, service_id. Please take a look at  the  example
119       section  for an example of the file. srp_daemon decide whether to allow
120       or disallow each target according  to first rule that match the target.
121       If  no  rule matches the target, the target is allowed and will be con‐
122       nected. In an allow rule it is possible to set attributes for the  con‐
123       nection  to  the  target.  Supported attributes are max_cmd_per_lun and
124       max_sect.
125
126

EXAMPLES

128       srp_daemon -e -i mthca0 -p 1 -R 60 (Connects to the targets  accessible
129       through port 1 of mthca0. Performs a complete rescan every minute)
130
131       srp_daemon  -o  -c  -a          (Prints the connection commands for the
132       targets in the fabric and exits - similar to ibsrpdm)
133
134       srp_daemon -e -f rules.txt        (Connects to the targets  allowed  in
135       the rules file rules.txt)
136
137       An example for a rules configuration file (such as /etc/srp_daemon.conf)
138       ------------------------------------------------------------------------
139       # Rules file example
140       # This is a comment
141       # disallow the following dgid
142       d       dgid=fe800000000000000002c90200402bd5
143       # allow target with the following ioc_guid
144       a       ioc_guid=00a0b80200402bd7
145       # allow target with the following id_ext and ioc_guid. And setting max_cmd_per_lun to 31.
146       a       id_ext=200500A0B81146A1,ioc_guid=00a0b80200402bef,max_cmd_per_lun=31
147       # disallow all the rest
148       d
149
150
151

SEE ALSO

153       ibsrpdm(1)
154
155

AUTHORS

157       Roland Dreier
158              <rolandd@cisco.com>
159
160       Ishai Rabinovitz
161              <ishai@mellanox.co.il>
162
163
164
165OpenFabrics                    September 5, 2006                 SRP_DAEMON(1)
Impressum