@@ -32,6 +32,9 @@ daxctl_LDADD =\
udevrulesdir = $(UDEVRULESDIR)
udevrules_DATA = 90-daxctl-device.rules
+daxctl_configdir = $(daxctl_confdir)
+daxctl_config_DATA = daxctl.example.conf
+
if ENABLE_SYSTEMD_UNITS
systemd_unit_DATA = daxdev-reconfigure@.service
endif
new file mode 100644
@@ -0,0 +1,27 @@
+# This is an example config file for daxctl
+# daxctl supports multiple configuration files. All files with the
+# .conf suffix under {sysconfdir}/daxctl.conf.d/ are valid config files.
+# Lines beginning with a '#' are treated as comments and ignored
+# The (section-name, subsection-name) tuple must be unique across all
+# config files.
+
+# The following example config snippet is used to automatically reconfigure
+# an nvdimm namespace with the specified UUID from 'devdax' mode to
+# 'system-ram'.
+
+# Uncomment the lines to activate it, and substitute the correct UUIDs and
+# other parameters for the desired behavior.
+
+# This can be replicated as many times as necessary to handle multiple
+# namespaces/dax devices, so long as the subsection name (e.g.
+# "unique_identifier_foo" in the example below) is unique across all
+# sections and all config files in the config path.
+
+# The nvdimm.uuid can be obtained from a command such as:
+# "ndctl list --device-dax"
+
+# [reconfigure-device unique_identifier_foo]
+# nvdimm.uuid=ed93e918-e165-49d8-921d-383d7b9660c5
+# mode = system-ram
+# online = true
+# movable = false
@@ -129,6 +129,7 @@ make check
%{_datadir}/daxctl/daxctl.conf
%{_unitdir}/daxdev-reconfigure@.service
%config %{_udevrulesdir}/90-daxctl-device.rules
+%config(noreplace) %{_sysconfdir}/daxctl.conf.d/daxctl.example.conf
%files -n LNAME
%defattr(-,root,root)
Add an example config file, and install it with 'make install' and via the RPM, so that the config path gets established, and there is an easily available template to edit as needed. Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> --- daxctl/Makefile.am | 3 +++ daxctl/daxctl.example.conf | 27 +++++++++++++++++++++++++++ ndctl.spec.in | 1 + 3 files changed, 31 insertions(+) create mode 100644 daxctl/daxctl.example.conf