R
R
Ruslan Gilfanov2018-04-09 13:59:37
linux
Ruslan Gilfanov, 2018-04-09 13:59:37

How to create a software RAID-1 array on Ubuntu from a partitioned/used and unpartitioned hard drive?

OS Ubuntu 17.10.
There are two HDDs of 1 TB each.
The first one is marked up and used:
- sda1 /
- sda5 /home
- sda6 swap
The second one is unallocated.
How can I build a RAID-1 array from them?
Obviously, you need to use the mdadm utility.
As I understand it, something like this:

mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda /dev/sdb

Someone can reveal the topic in more detail, describe the solution step by step and what are the possible pitfalls.
An important point, I would like to do without losing data on the marked hard drive.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2018-04-09
@ri_gilfanov

First, assemble the degraded array from one unallocated disk.
Transfer data from the partitioned disk to it.
Add a second drive to the array.
Something like this help.ubuntu.ru/wiki/migrate-to-raid
And yes, of course, make an ebackup first.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question