All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vishal Verma <vishal.l.verma@intel.com>
To: <nvdimm@lists.linux.dev>
Cc: Dan Williams <dan.j.williams@intel.com>,
	QI Fuli <qi.fuli@jp.fujitsu.com>,
	fenghua.hu@intel.com, Vishal Verma <vishal.l.verma@intel.com>
Subject: [ndctl PATCH v3 11/11] daxctl: add and install an example config file
Date: Fri, 10 Dec 2021 15:34:40 -0700	[thread overview]
Message-ID: <20211210223440.3946603-12-vishal.l.verma@intel.com> (raw)
In-Reply-To: <20211210223440.3946603-1-vishal.l.verma@intel.com>

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

diff --git a/daxctl/Makefile.am b/daxctl/Makefile.am
index 36dfc55..d1bf9fb 100644
--- a/daxctl/Makefile.am
+++ b/daxctl/Makefile.am
@@ -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
diff --git a/daxctl/daxctl.example.conf b/daxctl/daxctl.example.conf
new file mode 100644
index 0000000..8181863
--- /dev/null
+++ b/daxctl/daxctl.example.conf
@@ -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
diff --git a/ndctl.spec.in b/ndctl.spec.in
index 642670a..ce80f9d 100644
--- a/ndctl.spec.in
+++ b/ndctl.spec.in
@@ -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)
-- 
2.33.1


      parent reply	other threads:[~2021-12-10 22:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10 22:34 [ndctl PATCH v3 00/11] Policy based reconfiguration for daxctl Vishal Verma
2021-12-10 22:34 ` [ndctl PATCH v3 01/11] ndctl, util: add parse-configs helper Vishal Verma
2021-12-16 21:42   ` Dan Williams
2021-12-17 21:31     ` Verma, Vishal L
2021-12-21 12:54   ` Joao Martins
2021-12-10 22:34 ` [ndctl PATCH v3 02/11] ndctl: make ndctl support configuration files Vishal Verma
2021-12-16 21:47   ` Dan Williams
2021-12-10 22:34 ` [ndctl PATCH v3 03/11] ndctl, config: add the default ndctl configuration file Vishal Verma
2021-12-10 22:34 ` [ndctl PATCH v3 04/11] ndctl, monitor: refator monitor for supporting multiple config files Vishal Verma
2021-12-10 22:34 ` [ndctl PATCH v3 05/11] ndctl: Update ndctl.spec.in for 'ndctl.conf' Vishal Verma
2021-12-10 22:34 ` [ndctl PATCH v3 06/11] daxctl: Documentation updates for persistent reconfiguration Vishal Verma
2021-12-10 22:34 ` [ndctl PATCH v3 07/11] daxctl: add basic config parsing support Vishal Verma
2021-12-16 22:37   ` Dan Williams
2021-12-10 22:34 ` [ndctl PATCH v3 08/11] util/parse-configs: add a key/value search helper Vishal Verma
2021-12-16 22:44   ` Dan Williams
2021-12-10 22:34 ` [ndctl PATCH v3 09/11] daxctl/device.c: add an option for getting params from a config file Vishal Verma
2021-12-16 22:45   ` Dan Williams
2021-12-10 22:34 ` [ndctl PATCH v3 10/11] daxctl: add systemd service and udev rule for automatic reconfiguration Vishal Verma
2021-12-16 23:03   ` Dan Williams
2021-12-10 22:34 ` Vishal Verma [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211210223440.3946603-12-vishal.l.verma@intel.com \
    --to=vishal.l.verma@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=fenghua.hu@intel.com \
    --cc=nvdimm@lists.linux.dev \
    --cc=qi.fuli@jp.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.