STAFD(8)
π STAFD(8) β the STorage Appliance Finder, bestie edition π
okay so you opened the manual for stafd and honestly? slay. this is the STorage Appliance Finder, a whole system daemon, and she is that girl. let's get into it π«Ά
β¨ SYNOPSIS β¨
stafd [OPTIONS...]
that's it. that's the whole vibe. just stafd and whatever options your heart desires π
πΈ DESCRIPTION πΈ
so here's the tea, bestie: stafd is a system daemon that can automatically find and connect to NVMe-oF Discovery Controllers using mDNS service discovery. she literally just sniffs them out. no cap. π₯
and also? if mDNS can't find a Discovery Controller for whatever reason, you can hand-configure her using stafd.conf(5) to connect to the ones that mDNS just couldn't locate. she's flexible like that. main character energy fr fr β¨
π OPTIONS π
here's everything she understands, no skips, every single one:
-h,--helpβ prints the help text and dips. that's it, that's the whole job π--versionβ prints the version string and exits. show-off behavior, love that for her π-fFILE,--conf-file=FILEβ point her at a different configuration file thanstafd.conf(5). the default is/etc/stas/stafd.confbtw, in case you were wondering π¦-s,--syslogβ send messages to syslog instead of stdout. use this when you're runningstafdas a daemon. (default:false). yes queen, log responsibly π--tronβ Trace ON. (default:false). it's giving tracing. it's giving debug. we love a mysterious little flag β--idl=FILEβ print the D-Bus IDL toFILEand exit. fancy β¨
π EXIT STATUS π
on success, 0 is returned. anything else and you get a non-zero failure code. periodt.
π§ DAEMONIZATION π§
stafd is managed by systemd, and the following operations are supported (the original had a whole cute table but we're doing bullets because we're chill like that):
$ systemctl start stafdβ start daemon. go bestie go πβοΈ$ systemctl stop stafdβ stop daemon. theSIGTERMsignal is used to tell the daemon to stop. she hears you, she's leaving π$ systemctl restart stafdβ effectively a stop + start. the classic one-two π$ systemctl reload stafdβ reload configuration. this is done in real time without restarting the daemon. theSIGHUPsignal is used to tell the daemon to reload its configuration file.
β οΈ important caveat bestie: configuration parameters that affect connections (e.g. kato) will not apply to existing connections. only connections established after the configuration was changed will utilize the new configuration parameters. so don't come for her when your old connections are still on the old settings, ok? she warned you π
π DESIGN π
stafd uses the GLib main loop. the GLib Python module provides several low-level building blocks that stafd requires. and in addition, many Python modules "play nice" with GLib such as dasbus (D-Bus package) and pyudev (UDev package). GLib also provides additional components such as timers, signal handlers, and much more. the ecosystem is thriving, honestly πΈ
stafd connects to the avahi-daemon using D-Bus. the avahi-daemon, or simply Avahi, is an mDNS discovery service used for zero-configuration networking (zeroconf). stafd registers with Avahi to automatically locate Central Discovery Controllers (CDC) and Direct Discovery Controllers (DDC). when Avahi finds Discovery Controllers (DC), it notifies stafd, which connects to the DC with the help of the libnvme library. once a connection to a DC is established, stafd can retrieve the discovery log pages from that DC and cache them in memory. iconic behavior, no notes π₯
π CONFIGURATION π
stafd can automatically locate discovery controllers (DC) with the help of Avahi and connect to them. however, stafd can also operate in a non-automatic mode based on manually entered configuration. in other words? DCs can be entered in a configuration named /etc/stas/stafd.conf. this configuration file also provides additional parameters, such as log-level attributes used for debugging purposes. so yes, you can hand-hold her. she doesn't mind π«Ά
π D-BUS API π
the interface to stafd is D-Bus. this allows other programs, such as stafctl, to communicate with stafd. the D-Bus address is org.nvmexpress.staf. she's social, ok?? she talks to everybody πβ¨
π SEE ALSO π
go read those too, bestie. iykyk π
okay and finally, the cute little sign-off: this whole thing is from nvme-stas 2.4.1, and it's the STAFD(8) page. thanks for coming to my TED talk, mwah πππ¦
π¦ where this page comes from
- ubuntu resolute: nvme-stas 2.4.1-3build1 Β· Apache-2.0
- ubuntu stonking: nvme-stas 2.4.1-3build1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms