> For the complete documentation index, see [llms.txt](https://docs.pmem.io/ndctl-user-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pmem.io/ndctl-user-guide/v72.0/cxl-man-pages/cxl-write-labels-1.md).

# cxl-write-labels(1)

## NAME&#x20;

cxl-write-labels - write data to the label area on a memdev

## SYNOPSIS&#x20;

cxl write-labels \<mem> \[-i \<filename>]

## DESCRIPTION&#x20;

The region label area is a small persistent partition of capacity available on some CXL memory devices. The label area is used to and configure or determine the set of memory devices participating in different interleave sets. Read data from the input filename, or stdin, and write it to the given device. Note that the device must not be active in any region, or actively registered with the nvdimm subsystem. If it is, the kernel will not allow write access to the device’s label data area.

## OPTIONS&#x20;

\<memory device(s)>&#x20;

&#x20;   A memX device name, or a memdev id number. Restrict the operation to the specified memdev(s). The keyword all can be specified to indicate the lack of any restriction.

-s, --size=&#x20;

&#x20;   Limit the operation to the given number of bytes. A size of 0 indicates to operate over the entire label capacity.

-O, --offset=&#x20;

&#x20;   Begin the operation at the given offset into the label area.

-v&#x20;

&#x20;   Turn on verbose debug messages in the library (if libcxl was built with logging and debug enabled).

-i, --input

&#x20;   input file

## SEE ALSO&#x20;

[cxl-read-labels(1)](/ndctl-user-guide/v72.0/cxl-man-pages/cxl-read-labels-1.md), [cxl-zero-labels(1)](/ndctl-user-guide/v72.0/cxl-man-pages/cxl-zero-labels-1.md), CXL-2.0 9.13.2


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pmem.io/ndctl-user-guide/v72.0/cxl-man-pages/cxl-write-labels-1.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
