> For the complete documentation index, see [llms.txt](https://doc.engenius.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.engenius.ai/intel-r-vroc-for-linux-guide/appendix/mdraid-sysfs-components.md).

# MDRAID Sysfs Components

The MDRAID subsystem has sysfs components that provide information or can be used to tweak behavior and performance. All MDRAID devices present in the system are shown in /sys/block/.

Example:

{% code overflow="wrap" %}

```
# ls -l /sys/block/md*
lrwxrwxrwx 1 root root 0 May 17 13:26 /sys/block/md126 -> ../devices/virtual/block/md126
lrwxrwxrwx 1 root root 0 May 17 13:26 /sys/block/md127 -> ../devices/virtual/block/md127
```

{% endcode %}

Mapping between a device number and its name can be found as shown below:

\# ls -l /dev/md/ total 0

lrwxrwxrwx 1 root root 8 May 17 13:26 imsm0 -> ../md127

lrwxrwxrwx 1 root root 8 May 17 13:26 raid1 -> ../md126

```
# ls -l /dev/md/ total 0
lrwxrwxrwx 1 root root 8 May 17 13:26 imsm0 -> ../md127
lrwxrwxrwx 1 root root 8 May 17 13:26 raid1 -> ../md126
```

{% hint style="info" %}
Note:  md127 is imsm0 and md126 is raid1.
{% endhint %}

MD devices in /sys/block are symbolic links pointing to /sys/devices/virtual/block. All MD devices are in the md subdirectory in the /sys/devices/virtual/block/mdXYZ directory. In the md directory the following contents can be found:

<figure><img src="https://1753529209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbNwztk6PmLtEwxQxFPWx%2Fuploads%2Fh4wMWmOor9O9xDtnG0cn%2Fimage.png?alt=media&amp;token=c8894a22-fafe-4fb9-9f79-62d3c4aaf9d1" alt=""><figcaption></figcaption></figure>

Since the MD device is a container, the metadata version file will show:

```
# cat /sys/devices/virtual/block/md127/md/metadata_version external:imsm
```

The directory contains subdirectories dev-nvme1n1 and dev-nvme2n1 specifying the disks that the container is assembled from.

The MD volume contents look like below:

<figure><img src="https://1753529209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbNwztk6PmLtEwxQxFPWx%2Fuploads%2FVA9eTysHvVt3H1P2Odct%2Fimage.png?alt=media&amp;token=5278cc97-5f3b-4083-b782-923fefb598b5" alt=""><figcaption></figcaption></figure>

Several new files are present, and they are related to the RAID volume properties. Base information can be read from the following files:

Array size:

```
# cat /sys/devices/virtual/block/md126/md/array_size 1048576
```

Array state:

```
# cat /sys/devices/virtual/block/md126/md/array_state clean
```

Raid level:

```
# cat /sys/devices/virtual/block/md126/md/level raid1
```

Strip size:

```
# cat /sys/devices/virtual/block/md126/md/chunk_size 65536
```

Metadata:

```
# cat /sys/devices/virtual/block/md126/md/metadata_version external:/md127/0
```

And this is what is shown in the /proc/mdstat file for the example RAID information:

```
# cat /proc/mdstat Personalities : [raid1]
md127 : active raid1 nvme0n1[1] nvme1n1[0]
78148256 blocks super external:/md0/0 [2/2] [UU]
md0 : inactive nvme1n1[1](S) nvme0n1 [0](S) 2210 blocks super external:imsm

unused devices: <none>
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.engenius.ai/intel-r-vroc-for-linux-guide/appendix/mdraid-sysfs-components.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
