nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [ndctl PATCH 0/7] Policy based reconfiguration for daxctl
@ 2021-08-31  9:04 Vishal Verma
  2021-08-31  9:04 ` [ndctl PATCH 1/7] ndctl: Update ndctl.spec.in for 'ndctl.conf' Vishal Verma
                   ` (7 more replies)
  0 siblings, 8 replies; 29+ messages in thread
From: Vishal Verma @ 2021-08-31  9:04 UTC (permalink / raw)
  To: nvdimm; +Cc: Dan Williams, QI Fuli, fenghua.hu, Vishal Verma

These patches add policy (config file) support to daxctl. The
introductory user is daxctl-reconfigure-device. Sysadmins may wish to
use daxctl devices as system-ram, but it may be cumbersome to automate
the reconfiguration step for every device upon boot.

Introduce a new option for daxctl-reconfigure-device, --check-config.
This is at the heart of policy based reconfiguration, as it allows
daxctl to look up reconfiguration parameters for a given device from the
config system instead of the command line.

Some systemd and udev glue then automates this for every new dax device
that shows up, providing a way for the administrator to simply list all
the 'system-ram' UUIDs in a config file, and not have to worry about
anything else.

An example config file can be:

  # cat /etc/ndctl/daxctl.conf

  [auto-online unique_identifier_foo]
  uuid = 48d8e42c-a2f0-4312-9e70-a837faafe862
  mode = system-ram
  online = true
  movable = false

Any file under '/etc/ndctl/' can be used - all files with a '.conf' suffix
will be considered when looking for matches.

These patches depend on the initial config file support from Qi Fuli[1].
A branch containing these patches is available at [2].

[1]: https://lore.kernel.org/nvdimm/20210824095106.104808-1-qi.fuli@fujitsu.com/
[2]: https://github.com/pmem/ndctl/tree/vv/daxctl_config

Vishal Verma (7):
  ndctl: Update ndctl.spec.in for 'ndctl.conf'
  daxctl: Documentation updates for persistent reconfiguration
  util/parse-config: refactor filter_conf_files into util/
  daxctl: add basic config parsing support
  util/parse-configs: add a key/value search helper
  daxctl/device.c: add an option for getting params from a config file
  daxctl: add systemd service and udev rule for auto-onlining

 .../daxctl/daxctl-reconfigure-device.txt      |  67 +++++++++
 configure.ac                                  |   9 +-
 daxctl/lib/libdaxctl.c                        |  37 +++++
 ndctl/lib/libndctl.c                          |  19 +--
 daxctl/libdaxctl.h                            |   2 +
 util/parse-configs.h                          |  19 +++
 daxctl/daxctl.c                               |   1 +
 daxctl/device.c                               | 141 +++++++++++++++++-
 util/parse-configs.c                          |  67 +++++++++
 daxctl/90-daxctl-device.rules                 |   1 +
 daxctl/Makefile.am                            |  12 ++
 daxctl/daxdev-auto-reconfigure.sh             |   3 +
 daxctl/daxdev-reconfigure@.service            |   8 +
 daxctl/lib/Makefile.am                        |   6 +
 daxctl/lib/libdaxctl.sym                      |   2 +
 ndctl.spec.in                                 |   4 +
 ndctl/lib/Makefile.am                         |   2 +
 17 files changed, 381 insertions(+), 19 deletions(-)
 create mode 100644 daxctl/90-daxctl-device.rules
 create mode 100755 daxctl/daxdev-auto-reconfigure.sh
 create mode 100644 daxctl/daxdev-reconfigure@.service


base-commit: 5f1026ef3ad108f3f5aa889ef15edae92cb5de43
-- 
2.31.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2021-11-19 20:57 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [ndctl PATCH 2/7] daxctl: Documentation updates for persistent reconfiguration Vishal Verma
2021-09-16 22:47   ` 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

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).