# 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](/mikopbx/english/setup/bare-metal.md).
3. Connect to the machine via [**SSH**](/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](/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: 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:

```
GET https://docs.mikopbx.com/mikopbx/english/faq/setup/installation-on-mdadm-raid1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
