NDCTL-WRITE-INFOBLOCK(1)

✨ NDCTL-WRITE-INFOBLOCK ✨

okay bestie, welcome to the ndctl manual β€” yes, that ndctl, the whole toolkit lives under this manual name πŸ’–. This page is all about ndctl-write-infoblock, and it's giving "I generate and write an infoblock" energy. Let's get into it 🫢


🌸 NAME 🌸

ndctl-write-infoblock β€” generate and write an infoblock ✨


πŸŽ€ SYNOPSIS πŸŽ€

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

πŸ’… DESCRIPTION πŸ’…

so like, remember the theory of operation bit in ndctl-create-namespace(1)? 🧚 The raw capacity of a namespace can encapsulate a personality, aka a mode of operation. And that mode can be set to one of "sector", "fsdax", or "devdax". Each of those modes is defined by an info-block format that uniquely identifies which mode it is. The write-infoblock command knows how to generate an "fsdax" or "devdax" info-block relative to the specified image size. periodt πŸ’β™€οΈ

The generated block can be:

  • written to an existing namespace (as long as that namespace is not presently active, bestie 😭)
  • written to a file
  • piped to standard-out 🌈
Warning ⚠️ β€” this command is a debug facility. It can generate image files with valid infoblocks, but also invalid infoblocks for testing the kernel πŸ‘€. Use the --offset and --align options with care, fr fr. 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. no cap 🫠

πŸ¦‹ EXAMPLE πŸ¦‹

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

iconic, honestly ✨


🌈 OPTIONS 🌈

  • <namespace(s)> β€” one or more namespaceX.Y device names πŸ’–. You can also say the keyword all to operate on every namespace in the system, optionally filtered by bus id (see the --bus= option) or region id (see the --region= option).
  • -c, --stdout β€” write the infoblock to stdout 🫢
  • -o, --output= β€” write the infoblock to the given file (mutually exclusive with --stdout, so pick one bestie, you can't have both πŸ’…)
  • -m, --mode= β€” select the infoblock mode between fsdax and devdax 🌸. See ndctl-create-namespace(1) for the details on --mode.
  • -s, --size= β€” override the default size determined from the size of the file specified to --output πŸ“. In the --stdout case, this option is required (yeah, mandatory, no skipping πŸ™ˆ).
  • -a, --align= β€” specify the "align" value in the infoblock πŸŽ€. In the --mode=devdax case, "align" designates a page mapping size. And ngl, there is no validation of this value relative to the page mapping capabilities of the platform β€” so it's on you πŸ’€.
  • -u, --uuid= β€” override the default autogenerated UUID with the given value ⭐
  • -M, --map= β€” select whether the page map array is allocated from the device or from "System RAM" 🧠. Defaults to the device. See ndctl-create-namespace(1) for more details.
  • -p, --parent-uuid= β€” when the infoblock is stored on a labelled namespace, the UUID of the namespace must match the "parent uuid" attribute in the infoblock πŸ‘‘. This option defaults to the UUID of the namespace when --output and --stdout are not used β€” otherwise it defaults to a NULL UUID (all zeroes) πŸ«₯.
  • -O, --offset= β€” by default the assumption is that the infoblock is being written to a namespace or namespace-image that is aligned to its size. Specify this EXPERT/DEBUG option to experiment / test the kernel's handling of namespaces that violate that assumption 😳.
  • -r, --region= β€” a regionX device name, or a region id number 🌍. Restrict the operation to the specified region(s). The keyword all can be specified to indicate the lack of any restriction β€” however this is the same as not supplying a --region option at all, so like, make it make sense πŸ™ƒ.

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


πŸ“ SEE ALSO πŸ“


and that's the whole vibe check, bestie πŸ’– this was the ndctl manual page, version 2026-07-07 β€” go forth and infoblock responsibly, mwah πŸŽ€βœ¨πŸ‘‘

πŸ“¦ where this page comes from