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       -b, --bus=
79           Limit operation to memory devices (dimms) that are on the given
80           bus. Where bus can be a provider name or a bus id number.
81
82       -v
83           Turn on verbose debug messages in the library (if ndctl was built
84           with logging and debug enabled).
85
86       -f, --force
87           Force initialization of the label space even if there appears to be
88           an existing / valid namespace index. Warning, this will destroy all
89           defined namespaces on the dimm.
90
91       -V, --label-version
92           Initialize with a specific version of labels from the namespace
93           label specification. Defaults to 1.1
94
96       Copyright (c) 2016 - 2019, Intel Corporation. License GPLv2: GNU GPL
97       version 2 <http://gnu.org/licenses/gpl.html>. This  is  free  software:
98       you  are  free  to change and redistribute it. There is NO WARRANTY, to
99       the extent permitted by law.
100

SEE ALSO

102       ndctl-create-namespace(1), UEFI NVDIMM Label Protocol <http://
103       www.uefi.org/sites/default/files/resources/UEFI_Spec_2_7.pdf>
104
105
106
107ndctl                             2019-05-10              NDCTL-INIT-LABELS(1)
Impressum