> 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/faq/setup/installation-on-mdadm-raid1.md).

# Установка на MDADM RAID1

## Подготовка <a href="#podgotovka" id="podgotovka"></a>

{% hint style="danger" %}
ВНИМАНИЕ: Все данные на дисках будут уничтожены.
{% endhint %}

1. Подготовьте ПК с двумя дисками одинакового объема
2. Загрузите машину в режиме [LiveCD или LiveUSB](/mikopbx/setup/bare-metal.md)
3. Подключитесь к машине через [SSH](/mikopbx/faq/troubleshooting/connecting-to-a-pbx-using-ssh/putty.md)

## Сборка RAID 1 <a href="#sborka_raid_1" id="sborka_raid_1"></a>

1. Выполните в консоли команду.

```
fdisk -l 
```

2. Будут отображены имена дисков. В моем случае это.

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

3. Затираем суперблоки на дисках.

```
mdadm --zero-superblock --force /dev/sd{b,a} 
```

4. Чистим старые метаданные.

```
wipefs --all --force /dev/sd{b,a}
```

5. Создаем RAID1.

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

6. На вопрос «**Continue creating array?**» отвечаем утвердительно "**y".**
7. Далее можно начать установку [по инструкции ](/mikopbx/setup/bare-metal.md). При выборе диска следует указать **md0**

### Полезные статьи <a href="#poleznye_stati" id="poleznye_stati"></a>

* [Работа с mdadm в Linux для организации RAID](https://www.dmosk.ru/miniinstruktions.php?mini=mdadm)

### Grub <a href="#grub" id="grub"></a>

{% hint style="warning" %}
**TODO**: Необходимо править **grub.cfg** файл. Иначе, не факт, что при сбое одного из дисков, система загрузится.
{% endhint %}


---

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