1NDCTL-INIT-LABELS(1) NDCTL-INIT-LABELS(1)
2
3
4
6 ndctl-init-labels - initialize the label data area on a dimm or set of
7 dimms
8
10 ndctl init-labels <nmem0> [<nmem1>..<nmemN>] [<options>]
11
13 The namespace label area is a small persistent partition of capacity
14 available on some NVDIMM devices. The label area is used to provision
15 one, or more, namespaces from regions. Starting with v4.10 the kernel
16 will honor labels for sub-dividing PMEM if all the DIMMs in an
17 interleave set / region have a valid namespace index block.
18
19 This command can be used to initialize the namespace index block if it
20 is missing or reinitialize it if it is damaged. Note that
21 reinitialization effectively destroys all existing namespace labels on
22 the DIMM.
23
25 Find the DIMMs that comprise a given region:
26
27 # ndctl list -RD --region=region1
28 {
29 "dimms":[
30 {
31 "dev":"nmem0",
32 "id":"8680-56341200"
33 }
34 ],
35 "regions":[
36 {
37 "dev":"region1",
38 "size":268435456,
39 "available_size":0,
40 "type":"pmem",
41 "mappings":[
42 {
43 "dimm":"nmem0",
44 "offset":13958643712,
45 "length":268435456
46 }
47 ]
48 }
49 ]
50 }
51
52 Disable that region so the DIMM label area can be written from
53 userspace:
54
55 # ndctl disable-region region1
56
57 Initialize labels:
58
59 # ndctl init-labels nmem0
60
61 Re-enable the region:
62
63 # ndctl enable-region region1
64
65 Create a namespace in that region:
66
67 # ndctl create-namespace --region=region1
68
70 <memory device(s)>
71 A nmemX device name, or a dimm id number. Restrict the operation to
72 the specified dimm(s). The keyword all can be specified to indicate
73 the lack of any restriction, however this is the same as not
74 supplying a --dimm option at all.
75
76 -s, --size=
77 Limit the operation to the given number of bytes. A size of 0
78 indicates to operate over the entire label capacity.
79
80 -O, --offset=
81 Begin the operation at the given offset into the label area.
82
83 -b, --bus=
84 A bus id number, or a provider string (e.g. "ACPI.NFIT"). Restrict
85 the operation to the specified bus(es). The keyword all can be
86 specified to indicate the lack of any restriction, however this is
87 the same as not supplying a --bus option at all.
88
89 -v
90 Turn on verbose debug messages in the library (if ndctl was built
91 with logging and debug enabled).
92
93 -f, --force
94 Force initialization of the label space even if there appears to be
95 an existing / valid namespace index. Warning, this will destroy all
96 defined namespaces on the dimm.
97
98 -V, --label-version
99 Initialize with a specific version of labels from the namespace
100 label specification. Defaults to 1.1
101
103 Copyright © 2016 - 2022, Intel Corporation. License GPLv2: GNU GPL
104 version 2 http://gnu.org/licenses/gpl.html. This is free software: you
105 are free to change and redistribute it. There is NO WARRANTY, to the
106 extent permitted by law.
107
109 linkndctl:ndctl-create-namespace[1], UEFI NVDIMM Label Protocol[1]
110
112 1. UEFI NVDIMM Label Protocol
113 http://www.uefi.org/sites/default/files/resources/UEFI_Spec_2_7.pdf
114
115
116
117 08/03/2023 NDCTL-INIT-LABELS(1)