1NDCTL-WRITE-INFOBL(1)                                    NDCTL-WRITE-INFOBL(1)
2
3
4

NAME

6       ndctl-write-infoblock - generate and write an infoblock
7

SYNOPSIS

9       ndctl write-infoblock [<namespaceX.Y> | -o <file> | --stdout] [<options>]
10

DESCRIPTION

12       As described in the theory of operation section of
13       linkndctl:ndctl-create-namespace[1], the raw capacity of a namespace
14       may encapsulate a personality, or mode of operation. Specifically, the
15       mode may be set to one of "sector", "fsdax", and "devdax". Each of
16       those modes is defined by an info-block format that uniquely identifies
17       the mode of operation. The write-infoblock command knows how to
18       generate an "fsdax" or "devdax" info-block relative to the specified
19       image size.
20
21       The generated block can be written to an existing namespace (provided
22       that namespace is not presently active), written to a file, or piped to
23       standard-out.
24
25           Warning
26           This command is a debug facility that can generate image files with
27           valid infoblocks, but also invalid infoblocks for testing the
28           kernel. Use the --offset and --align options with care. Namely
29           --offset must match the actual physical address offset of the
30           namespace it is applied to, and --align must be one of the
31           architectures supported page sizes.
32

EXAMPLE

34           ndctl write-infoblock -s 1T -c | ndctl read-infoblock -j
35           wrote 1 infoblock
36           [
37             {
38               "file":"<stdin>",
39               "signature":"NVDIMM_PFN_INFO",
40               "uuid":"42e1d574-76ac-402c-9132-5436e31528c0",
41               "parent_uuid":"ef83e49c-4c4a-4fae-b908-72e94675b1b7",
42               "flags":0,
43               "version":"1.4",
44               "dataoff":17196646400,
45               "npfns":264237056,
46               "mode":2,
47               "start_pad":0,
48               "end_trunc":0,
49               "align":16777216,
50               "page_size":4096,
51               "page_struct_size":64
52             }
53           ]
54           read 1 infoblock
55

OPTIONS

57       <namespace(s)>
58           One or more namespaceX.Y device names. The keyword all can be
59           specified to operate on every namespace in the system, optionally
60           filtered by bus id (see --bus= option), or region id (see --region=
61           option).
62
63       -c, --stdout
64           Write the infoblock to stdout
65
66       -o, --output=
67           Write the infoblock to the given file (mutually exclusive with
68           --stdout).
69
70       -m, --mode=
71           Select the infoblock mode between fsdax and devdax. See
72           linkndctl:ndctl-create-namespace[1] for details on --mode.
73
74       -s, --size=
75           Override the default size determined from the size of the file
76           specified to --output. In the --stdout case, this option is
77           required.
78
79       -a, --align=
80           Specify the "align" value in the infoblock. In the --mode=devdax
81           case "align" designates a page mapping size. There is no validation
82           of this value relative to the page mapping capabilities of the
83           platform.
84
85       -u, --uuid=
86           Override the default autogenerated UUID with the given value.
87
88       -M, --map=
89           Select whether the page map array is allocated from the device or
90           from "System RAM". Defaults to the device. See
91           linkndctl:ndctl-create-namespace[1] for more details.
92
93       -p, --parent-uuid=
94           When the infoblock is stored on a labelled namespace the UUID of
95           the namespace must match the "parent uuid" attribute in the
96           infoblock. This option defaults to the UUID of the namespace when
97           --output and --stdout are not used, otherwise it defaults to a NULL
98           UUID (all zeroes).
99
100       -O, --offset=
101           By default the assumption is that the infoblock is being written to
102           a namespace or namespace-image that is aligned to its size. Specify
103           this EXPERT/DEBUG option to experiment / test the kernel’s handling
104           of namespaces that violate that assumption.
105
106       -r, --region=
107           A regionX device name, or a region id number. Restrict the
108           operation to the specified region(s). The keyword all can be
109           specified to indicate the lack of any restriction, however this is
110           the same as not supplying a --region option at all.
111
113       Copyright © 2016 - 2022, Intel Corporation. License GPLv2: GNU GPL
114       version 2 http://gnu.org/licenses/gpl.html. This is free software: you
115       are free to change and redistribute it. There is NO WARRANTY, to the
116       extent permitted by law.
117

SEE ALSO

119       linkndctl:ndctl-create-namespace[1], UEFI NVDIMM Label Protocol[1]
120

NOTES

122        1. UEFI NVDIMM Label Protocol
123           http://www.uefi.org/sites/default/files/resources/UEFI_Spec_2_7.pdf
124
125
126
127                                  08/03/2023             NDCTL-WRITE-INFOBL(1)
Impressum