Scroll to navigation

STAFD(8) STAFD(8)

NAME

stafd - STorage Appliance Finder

SYNOPSIS

stafd [OPTIONS...]

DESCRIPTION

stafd is a system daemon that can be used to automatically locate and connect to NVMe-oF Discovery Controllers using mDNS service discovery. Discovery Controllers that cannot be located using mDNS can be stated explicitly in the connectivity configuration, nvme-stas.conf(5). The daemon's own behaviour is configured in stafd.conf(5).

OPTIONS

The following options are understood:

-h, --help

Print the help text and exit.

--version

Print the version string and exit.

-fFILE, --conf-file=FILE

Specify a different configuration file than stafd.conf(5) (default: /etc/nvme/stafd.conf).

-cFILE, --conn-conf-file=FILE

Specify a different connectivity configuration file than nvme-stas.conf(5) (default: /etc/nvme/nvme-stas.conf).

-s, --syslog

Send messages to syslog instead of stdout. Use this when running stafd as a daemon. (default: false).

--tron

Trace ON. (default: false)

--idl=FILE

Print D-Bus IDL to FILE and exit.

EXIT STATUS

On success, 0 is returned, a non-zero failure code otherwise.

DAEMONIZATION

stafd is managed by systemd. The following operations are supported:

Table 1. 

Command Description
$ systemctl start stafd Start daemon.

$ systemctl stop stafd Stop daemon. The SIGTERM signal is used to tell the daemon to stop.

$ systemctl restart stafd Effectively a stop + start.

$ systemctl reload stafd Reload configuration. This is done in real time without restarting the daemon. The SIGHUP signal is used to tell the daemon to reload its configuration file. Note that configuration parameters that affect connections (e.g. keep-alive-tmo), will not apply to existing connections. Only connections established after the configuration was changed will utilize the new configuration parameters.

DESIGN

stafd
uses the GLib main loop. The GLib Python module provides several low-level building blocks that stafd requires. 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.

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 Centralized 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.

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. DCs are entered as [Discovery Controller] sections of the connectivity configuration, /etc/nvme/nvme-stas.conf, which also carries the parameters their connections are made with.

The daemon's own behaviour — tracing, mDNS, exclusions and the discovery connection management — is configured separately, in /etc/nvme/stafd.conf.

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.

SEE ALSO

stafd.conf(5), nvme-stas.conf(5), stafd.service(8), stafctl(1), org.nvmexpress.staf(5).

nvme-stas 3.0