1NDCTL-INIT-LABELS(1)             ndctl Manual             NDCTL-INIT-LABELS(1)
2
3
4

NAME

6       ndctl-init-labels - initialize the label data area on a dimm or set of
7       dimms
8

SYNOPSIS

10       ndctl init-labels <nmem0> [<nmem1>..<nmemN>] [<options>]
11

DESCRIPTION

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

EXAMPLE

27       Find the DIMMs that comprise a given region:
28
29           # ndctl list -RD --region=region1
30           {
31             "dimms":[
32               {
33                 "dev":"nmem0",
34                 "id":"8680-56341200"
35               }
36             ],
37             "regions":[
38               {
39                 "dev":"region1",
40                 "size":268435456,
41                 "available_size":0,
42                 "type":"pmem",
43                 "mappings":[
44                   {
45                     "dimm":"nmem0",
46                     "offset":13958643712,
47                     "length":268435456
48                   }
49                 ]
50               }
51             ]
52           }
53
54       Disable that region so the DIMM label area can be written from
55       userspace:
56
57           # ndctl disable-region region1
58
59       Initialize labels:
60
61           # ndctl init-labels nmem0
62
63       Re-enable the region:
64
65           # ndctl enable-region region1
66
67       Create a namespace in that region:
68
69           # ndctl create-namespace --region=region1
70

OPTIONS

72       <memory device(s)>
73           One or more nmemX device names. The keyword all can be specified to
74           operate on every dimm in the system, optionally filtered by bus id
75           (see
76                  --bus= option).
77
78       -s, --size=
79           Limit the operation to the given number of bytes. A size of 0
80           indicates to operate over the entire label capacity.
81
82       -O, --offset=
83           Begin the operation at the given offset into the label area.
84
85       -b, --bus=
86           Limit operation to memory devices (dimms) that are on the given
87           bus. Where bus can be a provider name or a bus id number.
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 (c) 2016 - 2019, Intel Corporation. License GPLv2: GNU GPL
104       version  2  <http://gnu.org/licenses/gpl.html>.  This is free software:
105       you are free to change and redistribute it. There is  NO  WARRANTY,  to
106       the extent permitted by law.
107

SEE ALSO

109       ndctl-create-namespace(1), UEFI NVDIMM Label Protocol <http://
110       www.uefi.org/sites/default/files/resources/UEFI_Spec_2_7.pdf>
111
112
113
114ndctl                             2019-10-28              NDCTL-INIT-LABELS(1)
Impressum