SRP_DAEMON(8)
π SRP_DAEMON(8) π
okay bestie, welcome to srp_daemon β she lives in section 8 of the manual (that's the admin/user commands zone) and she's here to find SRP targets in an InfiniBand Fabric. yes, that's the NAME. iconic. let's go β¨
π SYNOPSIS π
srp_daemon [-vVcaeon] [-d umad-device | -i infiniband-device [-p port-
num] | -j dev:port] [-t timeout(ms)] [-r retries] [-R rescan-time] [-f
rules-file]
that's the whole vibe right there. copy it, love it, use it π
π¦ DESCRIPTION π¦
so basically: srp_daemon discovers and connects to InfiniBand SCSI RDMA Protocol (SRP) targets in an IB fabric. she's a finder, she's a connector, she's doing the most π«Ά
each srp_daemon instance works on one local port. on boot she does a full rescan of the fabric, and then she just⦠waits. for an srp_daemon event. and what counts as an srp_daemon event, you ask? literally any of these:
- a new machine joins the fabric
- a machine's capabilities change
- an SA change
- a predefined timeout expiring
and here's how she reacts, no cap:
- new machine joins the fabric β
srp_daemonchecks if it's an SRP target - capabilities change β
srp_daemonchecks if that machine has turned into an SRP target - SA change or timeout expiration β
srp_daemonperforms a full rescan of the fabric
then, for every target she finds, she does a lil vibe check: should she connect to it according to her rules (default rules file is /etc/srp_daemon.conf, fyi), and is she already connected to the local port? and if the answer is "yes should connect" + "no not connected yet", then srp_daemon can either print the target details or actually connect to it. main character energy honestly π
β¨ OPTIONS β¨
-vβ print more verbose output. she's talking more now π¬-Vβ print even more verbose output (debug mode). full yapper mode, we love to see it π£οΈ-iinfiniband-deviceβ work oninfiniband-device. do not use this one with-dand do not use it with-j. pick a lane bestie π-pport-numβ work on portport-num(default1). this one must be used with-i, and should not be used with-dnor with-j. she's taken, she only goes with-iπ-jdev:portβ work on port numberportof InfiniBand devicedev. this one should not be used with-d,-inor with-p. solo act, no features π-dumad-deviceβ use device fileumad-device(default/dev/infiniband/umad0). this one should not be used with-i,-pnor with-j. also very much a lone wolf β-cβ generate output that's suitable for piping directly into a/sys/class/infiniband_srp/srp-<device>-<port>/add_targetfile. plug and play, literally π₯-aβ prints all the targets in the fabric, not only the targets that aren't connected through the local port. this is the same behavior asibsrpdm's. give me everything, no filter π-eβ execute the connection command, i.e. actually make the connection to the target. she's not just looking, she's doing π-oβ perform only one rescan and exit, just likeibsrpdm. one and done, in and out π§-Rrescan-timeβ force a complete rescan everyrescan-timeseconds. if-Ris not specified, no timeout rescans will be performed. (so if you don't ask for it, it's not happening, periodt)-Tretry-timeoutβ retries to connect to an existing target afterretry-timeoutseconds. if-Ris not specified, uses 5 Seconds timeout. ifretry-timeoutis0, will not try to reconnect. the reasonsrp_daemonretries to connect to the target is because there may be a rare scnerio in whichsrp_daemonwill try to connect to add a target when the target is about to be removed, but is not removed yet. messy situation, she handles it π-frules-fileβ decide which targets to connect to according to the rules inrules-file. if-fis not specified, uses the default rules file/etc/srp_daemon.conf. each line in therules-fileis a rule, and it can be either an allow connection or a disallow connection, depending on the first character in the line (aordaccordingly). the rest of the line is values forid_ext,ioc_guid,dgid,service_id. pls take a look at the example section for an example of the file π.srp_daemondecides whether to allow or disallow each target according to the first rule that matches the target. if no rule matches the target, the target is allowed and will be connected (generous queen πΈ). and in an allow rule you can set attributes for the connection to the target β supported attributes aremax_cmd_per_lunandmax_sectβ¨-ttimeoutβ use a timeout oftimeoutmsec for MAD responses (default:5sec). patience levels: adjustable β³-rretriesβ performretriesretries on each send to MAD (default:3retries). she tries again, she tries again, she tries again πͺ-nβ new format β also useinitiator_extin the connection command. glow up version π«--systemdβ enable systemd integration. teaming up with the system, collab era π€
π FILES π
/etc/srp_daemon.confβ the default rules configuration file that tells her which targets to connect to. can be overridden using the-frules-fileoption. each line in this file is a rule, which can be either an allow connection or a disallow connection, according to the first character in the line (aordaccordingly). the rest of the line is values forid_ext,ioc_guid,dgid,service_id. pls take a look at the example section for an example of the file π.srp_daemondecides whether to allow or disallow each target according to the first rule that matches the target. if no rule matches the target, the target is allowed and will be connected. in an allow rule it is possible to set attributes for the connection to the target β supported attributes aremax_cmd_per_lunandmax_sect. yes this is the same info as the-foption, we're just being thorough bestie π
πΈ EXAMPLES πΈ
okay these are the real ones, watch closely:
srp_daemon -e -i mthca0 -p 1 -R 60
(Connects to the targets accessible through port 1 of mthca0. Performs a complete rescan every minute)
srp_daemon -o -c -a
(Prints the connection commands for the targets in the fabric and exits β similar to ibsrpdm)
srp_daemon -e -f rules.txt
(Connects to the targets allowed in the rules file rules.txt)
and now⦠the moment you've been waiting for. an example for a rules configuration file (such as /etc/srp_daemon.conf):
# Rules file example
# This is a comment
# disallow the following dgid
d dgid=fe800000000000000002c90200402bd5
# allow target with the following ioc_guid
a ioc_guid=00a0b80200402bd7
# allow target with the following id_ext and ioc_guid. And setting max_cmd_per_lun to 31.
a id_ext=200500A0B81146A1,ioc_guid=00a0b80200402bef,max_cmd_per_lun=31
# disallow all the rest
d
π SEE ALSO π
ibsrpdm(8)β her sister, go say hi
π AUTHORS π
the literal legends who made this happen:
- Roland Dreier
<rolandd@cisco.com> - Ishai Rabinovitz
<ishai@mellanox.co.il>
and that's the whole page, bestie!! this one's brought to you by OpenFabrics, dated September 5, 2006 β yeah she's an elder but she still eats, no cap π β¨π¦
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- arch rolling: rdma-core 65.0-1 Β· GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-MIT AND GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-FreeBSD AND GPL-2.0-or-later OR LicenseRef-Intel-BSD-3-Clause AND GPL-2.0-or-later OR LicenseRef-PathScale-BSD-Patent-License AND CC0-1.0 AND MIT AND BSD-2-Clause AND CPL-1.0 OR BSD-2-Clause OR GPL-2.0-or-later
- centos-stream 10: srp_daemon 62.0-3.el10 Β· GPLv2 or BSD
- centos-stream 9: srp_daemon 61.0-3.el9 Β· GPLv2 or BSD
- debian bookworm: srptools 44.0-2 Β· BSD-MIT OR GPL-2.0-only
- debian trixie: srptools 56.1-1 Β· BSD-MIT OR GPL-2.0-only
- fedora 43: srp_daemon 58.0-4.fc43 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: srp_daemon 61.0-2.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: srp_daemon 61.1^20260812git975bdaf-1.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- opensuse-leap 16.0: srp_daemon 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: srp_daemon 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: srp_daemon 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: srp_daemon 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- ubuntu jammy: srptools 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: srptools 50.0-2build2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: srptools 50.0-2ubuntu0.2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu questing: srptools 56.1-1ubuntu1
- ubuntu resolute: srptools 61.0-2ubuntu3 Β· BSD-MIT OR GPL-2.0-only
- ubuntu stonking: srptools 64.0-1ubuntu1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms