Documentation for ndctl and daxctl


ndctl-create-namespace - provision or reconfigure a namespace


ndctl create-namespace [<options>]


The capacity of an NVDIMM REGION (contiguous span of persistent memory) is accessed via one or more NAMESPACE devices. REGION is the Linux term for what ACPI and UEFI call a DIMM-interleave-set, or a system-physical-address-range that is striped (by the memory controller) across one or more memory modules.

The UEFI specification defines the NVDIMM Label Protocol as the combination of label area access methods and a data format for provisioning one or more NAMESPACE objects from a REGION. Note that label support is optional and if Linux does not detect the label capability it will automatically instantiate a “label-less” namespace per region. Examples of label-less namespaces are the ones created by the kernel’s memmap=ss!nn command line option (see the nvdimm wiki on, or NVDIMMs without a valid namespace index in their label area.


Label-less namespaces lack many of the features of their label-rich cousins. For example, their size cannot be modified, or they cannot be fully destroyed (i.e. the space reclaimed). A destroy operation will zero any mode-specific metadata. Finally, for create-namespace operations on label-less namespaces, ndctl bypasses the region capacity availability checks, and always satisfies the request using the full region capacity. The only reconfiguration operation supported on a label-less namespace is changing its mode.

A namespace can be provisioned to operate in one of 4 modes, fsdax, devdax, sector, and raw. Here are the expected usage models for these modes:


Create a maximally sized pmem namespace in fsdax mode (the default)

ndctl create-namespace

Convert namespace0.0 to sector mode

ndctl create-namespace -f -e namespace0.0 --mode=sector


-t; --type=
Create a pmem or blk namespace (subject to available capacity). A pmem namespace supports the dax (direct access) capability to mmap2 persistent memory directly into a process address space. A blk namespace access persistent memory through a block-window-aperture. Compared to pmem it supports a traditional storage error model (EIO on error rather than a cpu exception on a bad memory access), but it does not support dax.

-m; --mode=

-s; --size=
For NVDIMM devices that support namespace labels, set the namespace size in bytes. Otherwise it defaults to the maximum size specified by platform firmware. This option supports the suffixes “k” or “K” for KiB, “m” or “M” for MiB, “g” or “G” for GiB and “t” or “T” for TiB.

For pmem namepsaces the size must be a multiple of the
interleave-width and the namespace alignment (see

-a; --align
Applications that want to establish dax memory mappings with page table entries greater than system base page size (4K on x86) need a persistent memory namespace that is sufficiently aligned. For “fsdax” and “devdax” mode this defaults to 2M. Note that “devdax” mode enforces all mappings to be aligned to this value, i.e. it fails unaligned mapping attempts. The “fsdax” alignment setting determines the starting alignment of filesystem extents and may limit the possible granularities, if a large mapping is not possible it will silently fall back to a smaller page size.

-e; --reconfig=
Reconfigure an existing namespace. This option is a shortcut for the following sequence:

-u; --uuid=
This option is not recommended as a new uuid should be generated every time a namespace is (re-)created. For recovery scenarios however the uuid may be specified.

-n; --name=
For NVDIMM devices that support namespace labels, specify a human friendly name for a namespace. This name is available as a device attribute for use in udev rules.

-l; --sector-size
Specify the logical sector size (LBA size) of the Linux block device associated with an namespace.

-M; --map=
A pmem namespace in “fsdax” or “devdax” mode requires allocation of per-page metadata. The allocation can be drawn from either:

-c; --continue
Do not stop after creating one namespace. Instead, greedily create as many namespaces as possible within the given –bus and –region filter restrictions. This will abort if any creation attempt results in an error unless –force is also supplied.

-f; --force
Unless this option is specified the reconfigure namespace operation will fail if the namespace is presently active. Specifying –force causes the namespace to be disabled before the operation is attempted. However, if the namespace is mounted then the disable namespace and reconfigure namespace operations will be aborted. The namespace must be unmounted before being reconfigured. When used in conjunction with –continue, continue the namespace creation loop even if an error is encountered for intermediate namespaces.

-L; --autolabel; --no-autolabel
Legacy NVDIMM devices do not support namespace labels. In that case the kernel creates region-sized namespaces that can not be deleted. Their mode can be changed, but they can not be resized smaller than their parent region. This is termed a “label-less namespace”. In contrast, NVDIMMs and hypervisors that support the ACPI 6.2 label area definition (ACPI 6.2 Section 6.5.10 NVDIMM Label Methods) support “labelled namespace” operation.

-R; --autorecover; --no-autorecover
By default, if a namespace creation attempt fails, ndctl will cleanup the partially initialized namespace. Use –no-autorecover to disable this behavior for debug and development scenarios where it useful to have the label and info-block state preserved after a failure.

-v; --verbose
Emit debug messages for the namespace creation process

-r; --region=
A regionX device name, or a region id number. Restrict the operation to the specified region(s). The keyword all can be specified to indicate the lack of any restriction, however this is the same as not supplying a –region option at all.

-b; --bus=
A bus id number, or a provider string (e.g. “ACPI.NFIT”). Restrict the operation to the specified bus(es). The keyword all can be specified to indicate the lack of any restriction, however this is the same as not supplying a –bus option at all.


Copyright © 2016 - 2020, Intel Corporation. License GPLv2: GNU GPL version 2 This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.


ndctl-zero-labels , ndctl-init-labels , ndctl-disable-namespace , ndctl-enable-namespace , UEFI NVDIMM Label Protocol Linux Persistent Memory Wiki