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
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

OPTIONS

92       <memory device(s)>
93           One or more nmemX device names. The keyword all can be specified to
94           operate on every dimm in the system, optionally filtered by bus id
95           (see --bus= option).
96
97       -b, --bus=
98           Limit operation to memory devices (dimms) that are on the given
99           bus. Where bus can be a provider name or a bus id number.
100
101       -v
102           Turn on verbose debug messages in the library (if ndctl was built
103           with logging and debug enabled).
104
105       -f, --force
106           Force initialization of the label space even if there appears to be
107           an existing / valid namespace index. Warning, this will destroy all
108           defined namespaces on the dimm.
109
110       -V, --label-version
111           Initialize with a specific version of labels from the namespace
112           label specification. Defaults to 1.1
113
115       Copyright (c) 2016 - 2018, Intel Corporation. License GPLv2: GNU GPL
116       version 2 http://gnu.org/licenses/gpl.html. This is free software: you
117       are free to change and redistribute it. There is NO WARRANTY, to the
118       extent permitted by law.
119

SEE ALSO

121       ndctl-create-namespace(1), UEFI NVDIMM Label Protocol[1]
122

NOTES

124        1. UEFI NVDIMM Label Protocol
125           http://www.uefi.org/sites/default/files/resources/UEFI_Spec_2_7.pdf
126
127
128
129ndctl 62                          11/02/2018              NDCTL-INIT-LABELS(1)
Impressum