NDCTL-WRITE-INFOBLOCK(1) | ndctl Manual | NDCTL-WRITE-INFOBLOCK(1) |
ndctl-write-infoblock - generate and write an infoblock
ndctl write-infoblock [<namespaceX.Y> | -o <file> | --stdout] [<options>]
As described in the theory of operation section of ndctl-create-namespace(1), the raw capacity of a namespace may encapsulate a personality, or mode of operation. Specifically, the mode may be set to one of "sector", "fsdax", and "devdax". Each of those modes is defined by an info-block format that uniquely identifies the mode of operation. The write-infoblock command knows how to generate an "fsdax" or "devdax" info-block relative to the specified image size.
The generated block can be written to an existing namespace (provided that namespace is not presently active), written to a file, or piped to standard-out.
This command is a debug facility that can generate image files
with valid infoblocks, but also invalid infoblocks for testing the kernel. Use
the --offset and --align options with care. Namely --offset must match the
actual physical address offset of the namespace it is applied to, and
--align must be one of the architectures supported page sizes.
ndctl write-infoblock -s 1T -c | ndctl read-infoblock -j wrote 1 infoblock [
{
"file":"<stdin>",
"signature":"NVDIMM_PFN_INFO",
"uuid":"42e1d574-76ac-402c-9132-5436e31528c0",
"parent_uuid":"ef83e49c-4c4a-4fae-b908-72e94675b1b7",
"flags":0,
"version":"1.4",
"dataoff":17196646400,
"npfns":264237056,
"mode":2,
"start_pad":0,
"end_trunc":0,
"align":16777216,
"page_size":4096,
"page_struct_size":64
} ] read 1 infoblock
<namespace(s)>
-c, --stdout
-o, --output=
-m, --mode=
-s, --size=
-a, --align=
-u, --uuid=
-M, --map=
-p, --parent-uuid=
-O, --offset=
-r, --region=
Copyright © 2016 - 2022, Intel Corporation. License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
ndctl-create-namespace(1), UEFI NVDIMM Label Protocol <http://www.uefi.org/sites/default/files/resources/UEFI_Spec_2_7.pdf>
2023-02-24 | ndctl |