On 29.12.2020 20:32, mick crane wrote:
On 2020-12-29 13:10, Andy Smith wrote:
<..>
The default metadata format (v1.2) for mdadm is at the beginning of
the device. If you've put a filesystem directly on the md device
then the presence of the metadata will prevent it being recognised
as a simple filesystem. What you can do is force mdadm to import it
as a degraded RAID-1.
<..>
I've puzzled about this. Are you supposed to have 3 disks ?
One for the OS and the other 2 for the raid1 ?

mick


No, you can setup RAID1 with 2 disks, protecting both OS and user data.
It could look, for an example, like this:

         =======================================
Disk1    |  sda1  |     sda2      |    sda3    |
         =======================================
            md0         md1            md2
         =======================================
Disk2    |  sdb1  |     sdb2      |    sdb3    |
         =======================================

Where: "Disk1" and "Disk2" have identical partition layout.
       "/dev/md0" is mounted as "/boot"
       "/dev/md1" is mounted as "/"
       "/dev/md2" is mounted as "/home"

On the low-level "sda1" and "sdb1" will contain identical data and so the other "paired" (mirrored) partitions.
Should one of the drives fail, OS will boot from second drive.
Arrays will be in degraded state, but will resync all data when failed drive will be replaced with a spare. You will have to use "mdadm" utility to perform recovery procedures (such as adding spare drive to array, install grub on it, etc).

--
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀

Reply via email to