[MIR] ndctl
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ndctl (Ubuntu) |
Fix Released
|
Undecided
|
Andreas Hasenack |
Bug Description
https:/
[Availability]
There is an on-going MIR for a package whose ndctl is a dependency:
pmdk (LP: #1790856)
* Package exists since bionic (-updates) in universe:
61.
63-1.3 | disco/universe
65-1 | eoan/universe
67-1 | focal/universe
* Packages:
ndctl libndctl6 libndctl-dev
daxctl libdaxctl1 libdaxctl-dev
ndctl: dctl is utility for managing the "libnvdimm" kernel
subsystem. The "libnvdimm" subsystem defines a kernel device
model and control message interface for platform NVDIMM resources
like those defined by the ACPI 6.0 NFIT (NVDIMM Firmware
Interface Table).
Operations supported by the tool include, provisioning capacity
(namespaces), as well as enumerating/
devices (dimms, regions, namespaces) associated with an NVDIMM
bus.
daxctl: The daxctl utility provides enumeration and provisioning
commands for the Linux kernel Device-DAX facility. This facility
enables DAX mappings of performance / feature differentiated
memory without need of a filesystem.
* Architectures:
source, amd64, arm64, armhf, i386, ppc64el, s390x
PMEM: A system-
block device composed of PMEM is capable of DAX. A PMEM address
range may span an interleave of several DIMMs.
BLK: A set of one or more programmable memory mapped apertures
provided by a DIMM to access its media. This indirection precludes
the performance benefit of interleaving, but enables DIMM-bounded
failure modes.
DAX: File system extensions to bypass the page cache and block layer
to mmap persistent memory, from a PMEM block device, directly into a
process address space.
Binary Packages:
ndctl
libndctl6
libndctl-dev
daxctl
libdaxctl1
libdaxctl-dev
[Rationale]
This is part of the MIR activity for all dependencies of pmdk. "ndctl" and "daxctl" are userland tools used to configure NVDIMMs and should be supported and put in main pocket (and server).
The "main" MIR of it is at:
https:/
Package was introduced in bionic after bionic was released (19.04.1)
in universe and it is still in universe until now.
[Security]
- No related CVEs found at: cve.mitre.org
[Quality assurance]
* Documentation:
- https:/
- https:/
- Both packages (ndctl and daxctl) and its libraries (libndctl6,
libndctl-dev, libdaxctl1, libdaxctl-dev) install fine and are
operational (check comment #1).
- There are no debconf templates and/or questions in this package.
- The only existing/opened bug affecting the package was LP: #1811785 and I have already provided 2 MRs fixing that issue. No other long-term outstanding bug affecting it. Upstream seems well maintained and isolating fix commits, making them easy to cherry-pick and/or backport.
- There are no current Debian bugs for ndctl (https:/
- Upstream has 25 cases opened (almost all of them with comments and discussions) and 77 cases already closed, leading to a conclusion that is actively maintained and provides good feedback to reporters.
- Package does not deal with exotic hardware, but, indeed, it deals with NEW type of hardware, getting more common every day (NVDIMMs). DAX support is already included in EXT4 and XFS filesystems, allowing NVDIMMs to be transparently used as block devices (without page cache). The userland libraries allow applications to get all benefits with a new memory (non-volatile) layer.
- Package has a minimum DEP8 support (for obvious issues with the binaries, as the utils need NVDIMMs to be present in the running environment).
- Package uses debian/watch.
- No lintian errors (pedantic).
- Package does not rely on obsolete packages:
$ apt-cache rdepends ndctl
ndctl
Reverse Depends:
daxctl
ndctl-dbgsym
daxctl
$ apt-cache depends ndctl
ndctl
PreDepends: init-system-helpers
Depends: libc6
Depends: libdaxctl1
Depends: libjson-c4
Depends: libkeyutils1
Depends: libndctl6
Depends: libuuid1
[UI standards]
N/A
[Dependencies]
$ apt-cache depends ndctl
ndctl
PreDepends: init-system-helpers
Depends: libc6
Depends: libdaxctl1 (itself)
Depends: libjson-c4 - main (exists since eoan)
Depends: libkeyutils1 - main
Depends: libndctl6 (itself)
Depends: libuuid1 - main
[Standards compliance]
- Package follows FHS.
- Debian Standards 4.4.1
- Source package is clear and well done.
[Maintenance]
The Server team will subscribe for the package for maintenance
[Background]
The Persistent Memory Development Kit (PMDK) is a collection of
libraries and tools for System Administrators and Application
Developers to simplify managing and accessing persistent memory
devices. The libraries build on the Direct Access (DAX) feature which
allows applications to directly access persistent memory as
memory-mapped files. This is described in detail in the Storage
Network Industry Association (SNIA) NVM Programming Model.
PMDK depends on libndctl.
The Non-Volatile Device Control (ndctl) is a utility for managing the
LIBNVDIMM Linux Kernel subsystem. The LIBNVDIMM subsystem defines a
kernel device model and control message interface for platform NFIT
(NVDIMM Firmware Interface Table). This interface was first defined
by the ACPI v6.0 specification. Later versions may enhance or modify
this specification. The latest ACPI and UEFI specifications can be
found at http://
The latest ACPI and UEFI specifications can be found at uefi.org.
Operations
supported by ndctl include:
- Provisioning capacity (namespaces)
- Enumerating Devices
- Enabling and Disabling NVDIMMs, Regions, and Namespaces
- Managing NVDIMM Labels
The LIBNVDIMM subsystem provides support for three types of NVDIMMs,
namely, PMEM, BLK, and NVDIMM devices that can simultaneously support
both PMEM and BLK mode access. These three modes of operation are
described by the "NVDIMM Firmware Interface Table" (NFIT) in ACPI
v6.0 or later. Linux Kernel documentation can be found at:
https:/
Related branches
- Steve Beattie: Approve
-
Diff: 468 lines (+429/-0)3 files modifiednotes_testing/ndctl/README.txt (+140/-0)
scripts/test-ndctl.py (+285/-0)
scripts/testlib.py (+4/-0)
- Rafael David Tinoco (community): Disapprove
- Christian Ehrhardt (community): Needs Information
-
Diff: 953 lines (+853/-1)15 files modifieddebian/changelog (+19/-0)
debian/control (+2/-1)
debian/tests/blk-exhaust (+20/-0)
debian/tests/btt-check (+163/-0)
debian/tests/btt-pad-compat (+153/-0)
debian/tests/common (+68/-0)
debian/tests/control (+43/-0)
debian/tests/dax (+90/-0)
debian/tests/dax-ext4 (+1/-0)
debian/tests/dax-xfs (+1/-0)
debian/tests/label-compat (+55/-0)
debian/tests/multi-dax (+39/-0)
debian/tests/rescan-partitions (+72/-0)
debian/tests/sector-mode (+39/-0)
debian/tests/vm-example.xml (+88/-0)
Changed in ndctl (Ubuntu): | |
milestone: | none → ubuntu-20.04 |
description: | updated |
description: | updated |
Changed in ndctl (Ubuntu): | |
assignee: | nobody → Christian Ehrhardt (paelzer) |
Changed in ndctl (Ubuntu): | |
assignee: | Ubuntu Security Team (ubuntu-security) → nobody |
(k)rafaeldtinoc o@emulated: ~$ sudo ndctl enable-dimm all
enabled 2 nmems
(k)rafaeldtinoc o@emulated: ~$ sudo ndctl list -D :"8680- 57341200" , failed_ arm":true :"8680- 56341200" , failed_ arm":true
[
{
"dev":"nmem1",
"id"
"handle":2,
"phys_id":0,
"flag_
},
{
"dev":"nmem0",
"id"
"handle":1,
"phys_id":0,
"flag_
}
]
(k)rafaeldtinoc o@emulated: ~$ sudo ndctl enable-region all
enabled 2 regions
(k)rafaeldtinoc o@emulated: ~$ ndctl list -R :"region1" , :2145386496, size":0, available_ extent" :0, e_domain" :"unknown" :"region0" , :2145386496, size":0, available_ extent" :0, e_domain" :"unknown"
[
{
"dev"
"size"
"available_
"max_
"type":"pmem",
"persistenc
},
{
"dev"
"size"
"available_
"max_
"type":"pmem",
"persistenc
}
]
(k)rafaeldtinoc o@emulated: ~$ sudo ndctl create-namespace -r region0 :"namespace0. 0", :"c3621fd1- 6b37-4241- 956f-eeffdb4988 72", size":512, :"pmem0"
{
"dev"
"mode":"fsdax",
"map":"dev",
"size":"2014.00 MiB (2111.83 MB)",
"uuid"
"sector_
"align":2097152,
"blockdev"
}
(k)rafaeldtinoc o@emulated: ~$ sudo ndctl create-namespace -r region1 :"namespace1. 0", :"ec231ca1- cc4a-41e6- 892b-e8afd3e363 13", size":512, :"pmem1"
{
"dev"
"mode":"fsdax",
"map":"dev",
"size":"2014.00 MiB (2111.83 MB)",
"uuid"
"sector_
"align":2097152,
"blockdev"
}
(k)rafaeldtinoc o@emulated: ~$ sudo cat /proc/iomem 2bfdfffff : namespace0.0 33fbfffff : namespace1.0
...
240000000-2bfdfffff : Persistent Memory
240000000-
2bfe00000-33fbfffff : Persistent Memory
2bfe00000-
(k)rafaeldtinoc o@emulated: ~$ sudo fdisk -l /dev/pmem0
Disk /dev/pmem0: 1.99 GiB, 2111832064 bytes, 4124672 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x6e3d7965
Device Boot Start End Sectors Size Id Type
/dev/pmem0p1 4096 4124671 4120576 2G 83 Linux
(k)rafaeldtinoc o@emulated: ~$ sudo mkfs.ext4 -b 4096 -E stride=512 -F /dev/pmem0 28bb-40ed- 9108-252e3787b0 8e
mke2fs 1.45.3 (14-Jul-2019)
Found a dos partition table in /dev/pmem0
Creating filesystem with 515584 4k blocks and 129024 inodes
Filesystem UUID: d6d72f36-
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
k)rafaeldtinoco @emulated: ~$ sudo mkfs.ext4 -b 4096 -E stride=512 /dev/pmem0 o@emulated: ~$ sudo mkfs.ext4 -b 4096 -E stride=512 /dev/pmem0p1 eea1-41dd- 9eaa-3f9e66c712 d0
pmem0# pmem0p1#
(k)rafaeldtinoc
mke2fs 1.45.3 (14-Jul-2019)
Creating filesystem with 515072 4k blocks and 128768 inodes
Filesystem UUID: 56e9b056-
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
(k)rafaeldtinoc o@emulated: ~$ sudo moun...