> For the complete documentation index, see [llms.txt](https://docs.mikopbx.com/mikopbx/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mikopbx.com/mikopbx/english/faq/setup/installation-on-mdadm-raid1.md).

# Installation on MDADM RAID1

## Preparation

{% hint style="danger" %}
**WARNING:** All data on the disks will be erased.
{% endhint %}

1. Prepare a PC with two disks of the same size.
2. Boot the machine in[ **LiveCD** or **LiveUSB** mode](https://docs.mikopbx.com/mikopbx/english/setup/bare-metal.md).
3. Connect to the machine via [**SSH**](https://docs.mikopbx.com/mikopbx/english/faq/troubleshooting/connecting-to-a-pbx-using-ssh/putty.md).

## RAID 1 Assembly

1. Run the following command in the console to display disk names:

```bash
fdisk -l
```

2. The disk names will be displayed. In this example, the disk names are:

```
/dev/sda
/dev/sdb
```

3. Clear the superblocks on the disks:

```bash
bashCopy codemdadm --zero-superblock --force /dev/sd{b,a}
```

4. Clean the old metadata:

```bash
bashCopy codewipefs --all --force /dev/sd{b,a}
```

5. Create the RAID1 array:

```bash
bashCopy codemdadm --create --metadata=0.90 --verbose /dev/md0 -l 1 -n 2 /dev/sd{b,a}
```

6. When prompted with "Continue creating array?", confirm by entering "**y**".
7. You can now proceed with the installation as per the [installation guide](https://docs.mikopbx.com/mikopbx/english/setup/bare-metal.md). When selecting the disk during installation, choose `md0`.

### Grub

**TODO:** You may need to modify the `grub.cfg` file. Otherwise, there is no guarantee that the system will boot if one of the disks fails.


---

# 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://docs.mikopbx.com/mikopbx/english/faq/setup/installation-on-mdadm-raid1.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.
