nvdimm.lists.linux.dev archive mirror
 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 2/7] daxctl: Documentation updates for persistent reconfiguration
Date: Tue, 31 Aug 2021 03:04:54 -0600	[thread overview]
Message-ID: <20210831090459.2306727-3-vishal.l.verma@intel.com> (raw)
In-Reply-To: <20210831090459.2306727-1-vishal.l.verma@intel.com>

Add a man page update describing how daxctl-reconfigure-device(1) can
be used for persistent reconfiguration of a daxctl device using a
config file.

Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
 .../daxctl/daxctl-reconfigure-device.txt      | 67 +++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/Documentation/daxctl/daxctl-reconfigure-device.txt b/Documentation/daxctl/daxctl-reconfigure-device.txt
index f112b3c..1e2d380 100644
--- a/Documentation/daxctl/daxctl-reconfigure-device.txt
+++ b/Documentation/daxctl/daxctl-reconfigure-device.txt
@@ -162,6 +162,15 @@ include::region-option.txt[]
 	brought online automatically and immediately with the 'online_movable'
 	policy. Use this option to disable the automatic onlining behavior.
+	Get reconfiguration parameters from the global daxctl config file.
+	This is typically used when daxctl-reconfigure-device is called from
+	a systemd-udevd device unit file. The reconfiguration proceeds only
+	if the UUID of the dax device passed in on the command line matches
+	a UUID listed in the auto-online section of the config. See the
+	'PERSISTENT RECONFIGURATION' section for more details.
@@ -183,6 +192,64 @@ include::human-option.txt[]
+The 'mode' of a daxctl device is not persistent across reboots by default. This
+is because the device itself may hold any metadata that hints at what mode it
+was set to, or is intended to be used in. The default mode for such a device
+is 'devdax', and on reboot, that is the mode devices appear in by default.
+The administrator may desire to configure the system in a way that certain
+dax devices are always reconfigured into a certain mode every time on boot.
+This is accomplished via a daxctl config file located at [location TBD].
+The config file may have multiple sections influencing different aspects of
+daxctl operation. The section of interest for persistent reconfiguration is
+'auto-online'. The format of this is as follows:
+[auto-online <subsection_name>]
+uuid = <namespace uuid>
+mode = <desired reconfiguration mode> (default: system-ram)
+online = <true|false> (default: true)
+movable = <true|false> (default: true)
+Here is an example of a config snippet for managing three devdax namespaces,
+one is left in devdax mode, the second is changed to system-ram mode with
+default options (online, movable), and the third is set to system-ram mode,
+the memory is onlined, but not movable.
+Note that the 'subsection name' can be arbitrary, and is only used to
+identify a specific config section. It does not have to match the 'device
+name' (e.g. 'dax0.0' etc).
+[auto-online dax0]
+uuid = ed93e918-e165-49d8-921d-383d7b9660c5
+mode = devdax
+[auto-online dax1]
+uuid = f36d02ff-1d9f-4fb9-a5b9-8ceb10a00fe3
+mode = system-ram
+[auto-online dax2]
+uuid = f36d02ff-1d9f-4fb9-a5b9-8ceb10a00fe3
+mode = system-ram
+online = true
+movable = false
+The following example can be used to create a devdax mode namespace, and
+simultaneously add the newly created namespace to the config file for
+system-ram conversion.
+ndctl create-namespace --mode=devdax | \
+	jq -r "\"[auto-online $(uuidgen)]\", \"uuid = \(.uuid)\", \"mode = system-ram\"" >> $config_path

  parent reply	other threads:[~2021-08-31  9:06 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31  9:04 [ndctl PATCH 0/7] Policy based reconfiguration for daxctl Vishal Verma
2021-08-31  9:04 ` [ndctl PATCH 1/7] ndctl: Update ndctl.spec.in for 'ndctl.conf' Vishal Verma
2021-09-02 12:15   ` qi.fuli
2021-08-31  9:04 ` Vishal Verma [this message]
2021-09-16 22:47   ` [ndctl PATCH 2/7] daxctl: Documentation updates for persistent reconfiguration Dan Williams
2021-11-17 23:02     ` Verma, Vishal L
2021-08-31  9:04 ` [ndctl PATCH 3/7] util/parse-config: refactor filter_conf_files into util/ Vishal Verma
2021-09-02 12:17   ` qi.fuli
2021-09-16 22:54   ` Dan Williams
2021-08-31  9:04 ` [ndctl PATCH 4/7] daxctl: add basic config parsing support Vishal Verma
2021-09-02 12:19   ` qi.fuli
2021-09-16 22:58   ` Dan Williams
2021-11-17 23:17     ` Verma, Vishal L
2021-08-31  9:04 ` [ndctl PATCH 5/7] util/parse-configs: add a key/value search helper Vishal Verma
2021-09-02 13:12   ` qi.fuli
2021-09-16 23:54   ` Dan Williams
2021-11-17 23:21     ` Verma, Vishal L
2021-08-31  9:04 ` [ndctl PATCH 6/7] daxctl/device.c: add an option for getting params from a config file Vishal Verma
2021-09-17  1:59   ` Dan Williams
2021-11-17 23:45     ` Verma, Vishal L
2021-08-31  9:04 ` [ndctl PATCH 7/7] daxctl: add systemd service and udev rule for auto-onlining Vishal Verma
2021-09-03  0:56   ` qi.fuli
2021-09-17 18:10   ` Dan Williams
2021-11-17 23:29     ` Verma, Vishal L
2021-11-17 23:43       ` Dan Williams
2021-11-18  2:40     ` Verma, Vishal L
2021-11-18  3:40       ` Dan Williams
2021-09-16 22:12 ` [ndctl PATCH 0/7] Policy based reconfiguration for daxctl Dan Williams
2021-11-19 20:57   ` Verma, Vishal L

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:

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

  git send-email \
    --in-reply-to=20210831090459.2306727-3-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 \


* 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).