NDCTL-INIT-LABELS(1)
β¨ NAME β¨
okay so bestie, this is ndctl-init-labels from the ndctl manual β it's the glow-up command that initializes the label data area on a dimm or a whole lil squad of dimms. π
πΈ SYNOPSIS πΈ
ndctl init-labels <nmem0> [<nmem1>..<nmemN>] [<options>]
π DESCRIPTION π
okay so picture this: the namespace label area is a tiny persistent partition of capacity that lives on some NVDIMM devices. it's not the main character storage-wise, but it IS the planner β it's what you use to provision one (or more!!) namespaces out of regions. ποΈ
and here's the tea: starting with v4.10 the kernel will actually honor labels for sub-dividing PMEM, but ONLY if all the DIMMs in an interleave set / region have a valid namespace index block. no valid index block? no sub-dividing. it's giving all-or-nothing. π€
so this command exists to initialize the namespace index block if it's missing, or reinitialize it if it's damaged. very fixer-upper of it.
β οΈ but bestie listen β reinitialization effectively destroys ALL existing namespace labels on the DIMM. like, gone gone. not a drill. π
π EXAMPLE π
first, find the DIMMs that make up a given region:
# ndctl list -RD --region=region1
{
"dimms":[
{
"dev":"nmem0",
"id":"8680-56341200"
}
],
"regions":[
{
"dev":"region1",
"size":268435456,
"available_size":0,
"type":"pmem",
"mappings":[
{
"dimm":"nmem0",
"offset":13958643712,
"length":268435456
}
]
}
]
}
next, disable that region so the DIMM label area can actually be written from userspace:
# ndctl disable-region region1
now initialize the labels, slay:
# ndctl init-labels nmem0
re-enable the region so it can live its truth:
# ndctl enable-region region1
and finally, create a namespace in that region:
# ndctl create-namespace --region=region1
periodt. that's the whole ritual. π―οΈβ¨
π OPTIONS π
<memory device(s)>β anmemXdevice name, or a dimm id number. restricts the operation to the dimm(s) you named. you can also pass the keywordallto say "no restrictions, bestie", but ngl that's literally the same as just not supplying a--dimmoption at all. π-s,--size=β limit the operation to the given number of bytes. a size of0means "operate over the entire label capacity" β the whole thing, head to toe. π«-O,--offset=β begin the operation at the given offset into the label area. pick your starting point, queen.-b,--bus=β a bus id number, or a provider string (e.g."ACPI.NFIT"). restricts the operation to the specified bus(es). the keywordallcan be specified to indicate the lack of any restriction, however this is the same as not supplying a--busoption at all. same energy as the dimm one fr fr. π-vβ turn on verbose debug messages in the library β but only ifndctlwas built with logging and debug enabled. if it wasn't, this is just vibes. π-f,--forceβ force initialization of the label space even if there appears to be an existing / valid namespace index. π¨ WARNING: this will destroy all defined namespaces on the dimm. it's giving nuclear. be so serious before you type this one. π-V,--label-versionβ initialize with a specific version of labels from the namespace label specification. defaults to1.1. (the1.1is the factory setting, the OG, the blueprint. β)
π«Ά COPYRIGHT π«Ά
Copyright Β© 2016 - 2022, Intel Corporation. License GPLv2: GNU GPL version 2 http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
π translation: it's free, you can remix it, but there is NO WARRANTY β so don't come for anyone if it goes sideways.
π SEE ALSO π
ndctl-create-namespace(1)- UEFI NVDIMM Label Protocol <http://www.uefi.org/sites/default/files/resources/UEFI_Spec_2_7.pdf>
and that's the whole page, bestie!! π¦ this one's from the ndctl manual, dated 2026-07-07, and it'll always be known as NDCTL-INIT-LABELS(1) in our hearts. go initialize those labels responsibly, and remember: --force is not a personality trait. π
πβ¨
π¦ where this page comes from
- fedora 43: ndctl 85-1.fc43 Β· GPL-2.0-only AND LGPL-2.1-only AND CC0-1.0 AND MIT
- fedora 44: ndctl 85-1.fc44 Β· GPL-2.0-only AND LGPL-2.1-only AND CC0-1.0 AND MIT
- ubuntu stonking: ndctl 82-1ubuntu1 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms