NDCTL User Guide
HomePMDKNDCTLBlog
v71
v71
  • NDCTL User Guide
  • Installing NDCTL & DAXCTL
    • Installing NDCTL and DAXCTL Packages on Linux
    • Installing NDCTL and DAXCTL from Source on Linux
  • Quick Start
  • Concepts
    • NVDIMM Devices
    • PMEM and BLK Modes
    • Regions
      • Regions, Atomic Sectors, and DAX
    • Label Storage Area (LSA)
    • Namespaces
  • Managing NVDIMMs
  • Managing Regions
  • Managing Label Storage Areas (LSA)
  • Managing Namespaces
  • Managing NVDIMM Security
  • NDCTL Man Pages
    • ndctl(1)
    • ndctl-activate-firmware(1)
    • ndctl−check−labels(1)
    • ndctl−check−namespace(1)
    • ndctl−clear−errors(1)
    • ndctl−create−namespace(1)
    • ndctl−destroy−namespace(1)
    • ndctl−disable−dimm(1)
    • ndctl−disable−namespace(1)
    • ndctl−disable−region(1)
    • ndctl−enable−dimm(1)
    • ndctl-enable−namespace(1)
    • ndctl−enable−region(1)
    • ndctl−freeze−security(1)
    • ndctl−init−labels(1)
    • ndctl−inject−error(1)
    • ndctl−inject−smart(1)
    • ndct-list(1)
    • ndctl−load−keys(1)
    • ndctl−monitor(1)
    • ndctl-read-infoblock(1)
    • ndctl−read−labels(1)
    • ndctl−remove−passphrase(1)
    • ndctl−sanitize−dimm(1)
    • ndctl−setup−passphrase(1)
    • ndctl−start−scrub(1)
    • ndctl-update-firmware(1)
    • ndctl-update-passphrase(1)
    • ndctl−wait−overwrite(1)
    • ndctl−wait−scrub(1)
    • ndctl-write-infoblock(1)
    • ndctl−write−labels(1)
    • ndctl−zero−labels(1)
  • DAXCTL Man Pages
    • daxctl(1)
    • daxctl-create-device (1)
    • daxctl-destroy-device (1)
    • daxctl-disable-device (1)
    • daxctl-enable-device (1)
    • daxctl-list(1)
    • daxctl−migrate−device−model(1)
    • daxctl−offline−memory(1)
    • daxctl−online−memory(1)
    • daxctl−reconfigure−device(1)
  • Troubleshooting
  • Glossary
  • Reference Material
Powered by GitBook
On this page
  • NAME
  • SYNOPSIS
  • EXAMPLE
  • OPTIONS
  • COPYRIGHT
  • SEE ALSO

Was this helpful?

  1. NDCTL Man Pages

ndctl-write-infoblock(1)

Previousndctl−wait−scrub(1)Nextndctl−write−labels(1)

Last updated 5 years ago

Was this helpful?

NAME

ndctl-write-infoblock - generate and write an infoblock

SYNOPSIS

As described in the theory of operation section of , 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.

Warning

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.

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

OPTIONS

<namespace(s)>

One or more namespaceX.Y device names. The keyword all can be specified to operate on every namespace in the system, optionally filtered by bus id (see --bus= option), or region id (see --region= option).

-c, --stdout

Write the infoblock to stdout

-o, --output

Write the infoblock to the given file (mutually exclusive with --stdout).

-m, --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.

-a, --align

Specify the "align" value in the infoblock. In the --mode=devdax case "align" designates a page mapping size. There is no validation of this value relative to the page mapping capabilities of the platform.

-u, --uuid

Override the default autogenerated UUID with the given value.

-M, --map

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

COPYRIGHT

SEE ALSO

Select the infoblock mode between fsdax and devdax. See for details on --mode.

Select whether the page map array is allocated from the device or from "System RAM". Defaults to the device. See for more details.

Copyright (c) 2016 - 2019, Intel Corporation. License GPLv2: GNU GPL version 2 . 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
ndctl-create-namespace
ndctl-create-namespace
http://gnu.org/licenses/gpl.html
ndctl-create-namespace
UEFI NVDIMM Label Protocol