Scroll to navigation

STAFD.CONF(5) STAFD.CONF(5)

NAME

stafd.conf - stafd(8) configuration file

SYNOPSIS

/etc/nvme/stafd.conf

DESCRIPTION

When stafd(8) starts up, it reads its configuration from stafd.conf.

CONFIGURATION FILE FORMAT

stafd.conf is a plain text file divided into sections, with configuration entries in the style key=value. Spaces immediately before or after the = are ignored. Empty lines are ignored as well as lines starting with #, which may be used for commenting.

OPTIONS

[Global] section

The following options are available in the [Global] section:

tron=

Trace ON. Takes a boolean argument. If true, enables full code tracing. The trace will be displayed in the system log such as systemd's journal. Defaults to false.

ip-family=

Takes a string argument. With this you can specify whether IPv4, IPv6, or both are supported when connecting to a Controller. Connections will not be attempted to IP addresses (whether discovered or configured in the connectivity configuration) disabled by this option. If an invalid value is entered, then the default (see below) will apply.

Choices are ipv4, ipv6, or ipv4+ipv6.

Defaults to ipv4+ipv6.

ignore-iface=

Takes a boolean argument. This option controls how connections with Discovery Controllers (DC) are made.

DCs are automatically discovered using DNS-SD/mDNS. mDNS provides the DC's IP address and the interface on which the DC was discovered.

There is no guarantee that there will be a route to reach that DC. However, we can use the socket option SO_BINDTODEVICE to force the connection to be made on a specific interface instead of letting the routing tables decide where to make the connection.

This option determines whether stafd will use SO_BINDTODEVICE to force connections on an interface or just rely on the routing tables. The default is to use SO_BINDTODEVICE, in other words, stafd does not ignore the interface by default.

Defaults to false.

pleo=

Port Local Entries Only. Takes a string argument enabled or disabled. This option is sent in the LSP field (Log SPecific) of the Get Discovery Log Page (DLP) command. It is used by stafd to tell Discovery Controllers (DC) whether the response to a Get DLP command should contain all the NVM subsystems or only those reachable by the host on the interface where the Get DLP command was issued by the host.

This parameter was introduced in TP8010. When pleo=enabled, then the DC shall return records for only NVM subsystem ports that are presented through the same NVM subsystem port that received the Get Log Page command. When pleo=disabled, then the DC may return all the NVM subsystem ports that it holds, even those that can only be reached on NVM subsystem ports that did not receive the Get Log Page command. In other words, the host may not even be able to reach those subsystems.

Defaults to enabled.

[Service Discovery] section

The following options are available in the [Service Discovery] section:

zeroconf=

Enable zeroconf provisioning using DNS-SD/mDNS. Takes a string argument enabled or disabled.

When enabled, the default, stafd makes a request with the Avahi daemon to locate Discovery Controllers using DNS-SD/mDNS.

Discovery Controllers that support zeroconf advertise themselves over mDNS with the service type _nvme-disc._tcp.

Defaults to true.

[Discovery controller connection management] section

The following options are available in the [Discovery controller connection management] section:

epcsd-poll-interval-minutes=

Takes an unsigned integer argument. How often to reconnect and re-check a Discovery Controller (DC) that does not support persistent discovery connections. Such a DC is disconnected between checks: there is nothing to hold open, and it cannot report that its discovery log pages changed, so polling is the only way to notice that they did.

A value of 0 is not valid. Unlike an interval that merely schedules extra work, this poll is the only way a disconnected DC comes back.

Whether a DC's connection is held open at all is not configured here. That is the persistent key of nvme-stas.conf(5), which takes no, auto or force and may be set for each DC. It defaults to auto: hold the connection open wherever the DC reports, through the EPCSD flag of its discovery log page entry, that it supports one. Note this default differs from libnvme's, where an unset value behaves as no — as it does for a plain nvme connect-all, which holds nothing open unless asked to. It is the same choice nvme-discoverd makes, which parks an EPCSD=0 Discovery Controller on the same epcsd-poll-interval-minutes.

Defaults to 15.

dc-giveup-timeout=

Takes a systemd time span such as "72hours" or "3 days 5 hours", or a unit-less value in seconds. Note that the unit is seconds, so "72" means 72 seconds and not 72 hours. The span is parsed exactly as systemd parses one, which is also how nvme-discoverd reads this same parameter. A value of 0 means no persistence. In other words, configuration acquired through zeroconf (mDNS service discovery) will be removed immediately when mDNS no longer reports the presence of a Discovery Controller (DC) and connectivity to that DC is lost. The value infinity means that configuration acquired through zeroconf will persist forever.

This is used for the case where a DC that was discovered through mDNS service discovery no longer advertises itself through mDNS and can no longer be connected to. For example, the DC had some catastrophic failure (e.g. power surge) and needs to be replaced. In that case, the connection to that DC can never be restored and a replacement DC will be needed. The replacement DC will likely have a different NQN (or IP address). In that scenario, the host won't be able to determine that the old DC is not coming back. It won't know either that a newly discovered DC is really the replacement for the old one. For that reason, the host needs a way to "age" zeroconf-acquired configuration and remove it automatically after a certain amount of time. This is what this parameter is for.

Defaults to 72hours.

[Controllers] section

The following options are available in the [Controllers] section:


Note

The controller= keyword no longer belongs here. Which controllers to connect to, and with what parameters, is stated in /etc/nvme/nvme-stas.conf as of nvme-stas 3.0 — a Discovery Controller as a [Discovery Controller] section, an I/O subsystem as a [Subsystem] section. See nvme-stas.conf(5). A controller= entry left behind in this file is reported in the log, not silently ignored.

exclude=

Controllers that should be excluded can be specified with the exclude= option. Using mDNS to automatically discover and connect to controllers, can result in unintentional connections being made. This keyword allows configuring the controllers that should not be connected to.

Deprecated. Use libnvme's host-wide exclusion list instead: /etc/nvme/exclusions.conf and /etc/nvme/exclusions.conf.d/, which are managed with nvme exclusion. That list is honored by every NVMe-oF tool on the host, not just stafd and stacd, and it is read live: an entry added there takes effect on the next connection attempt, without reloading stafd or stacd.

exclude= still works and is honored in addition to libnvme's list — a controller is excluded if it matches either — but it will be removed in a future release.

An entry is a series of fields separated by semi-colons:

exclude=transport=[trtype];traddr=[traddr];trsvcid=[trsvcid];host-iface=[iface];nqn=[nqn]

Every field is optional. Multiple exclude= keywords may appear in the config file to specify more than 1 excluded controller.

Note 1: A minimal match approach is used to eliminate unwanted controllers. That is, you do not need to specify all the parameters to identify a controller. Just specifying the host-iface, for example, can be used to exclude all controllers on an interface.

Note 2: an exclusion takes precedence over the connectivity configuration. A controller configured in /etc/nvme/nvme-stas.conf can be eliminated by the exclude= keyword.

Examples:

exclude = transport=tcp;traddr=fe80::2c6e:dee7:857:26bb # Eliminate a specific address
exclude = host-iface=enp0s8                             # Eliminate everything on this interface

SEE ALSO

stafd(8), nvme-stas.conf(5), systemd.time(7)

nvme-stas 3.0