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

EXAMPLE

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

OPTIONS

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

SEE ALSO

118       ndctl-create-namespace(1), UEFI NVDIMM Label Protocol[1]
119

NOTES

121        1. UEFI NVDIMM Label Protocol
122           http://www.uefi.org/sites/default/files/resources/UEFI_Spec_2_7.pdf
123
124
125
126ndctl 71.1                        12/22/2020             NDCTL-WRITE-INFOBL(1)
Impressum