table of contents
| 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=
ip-family=
Choices are ipv4, ipv6, or ipv4+ipv6.
Defaults to ipv4+ipv6.
ignore-iface=
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=
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=
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=
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=
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=
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¶
| nvme-stas 3.0 |