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