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

SEE ALSO

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