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]] [-t timeout(ms)] [-r retries] [-R Rescan-time] [-f rules-File]
12
13
14

DESCRIPTION

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

OPTIONS

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

FILES

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

EXAMPLES

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

SEE ALSO

143       ibsrpdm(1)
144
145

AUTHORS

147       Roland Dreier
148              <rolandd@cisco.com>
149
150       Ishai Rabinovitz
151              <ishai@mellanox.co.il>
152
153
154
155OpenFabrics                    September 5, 2006                 SRP_DAEMON(1)
Impressum