0

Installing Debian 10. I have 3 disks I want to use as RAID5 on a UEFI machine.
I have tried several configurations that either led to failure to install grub or failure to boot (stuck in grub-rescue and not able to find /boot).

Did anyone managed to do this?
With what set of partitions (EFI, swap, ext4)?

  • One /efi fat32 for grub, one /boot ext4 for kernel and other boot files (these to be mirrored so grub can read it), do what you want with swap, and then finally put root on partitions with raid5, raid5 is only working after kernel starts, so anything needed before that needs to be non raid required, (such as raid1, but do note that you might need older metadata versions) – NiKiZe Dec 10 '21 at 06:23
  • Is it software raid though? – Tom Yan Dec 10 '21 at 07:19
  • You should not use RAID5 if data is of any importance to you. – Tero Kilkanen Dec 10 '21 at 07:40
  • @TomYan tagged as software-raid and mentioned issues would not be relevant if hw-raid. – NiKiZe Dec 10 '21 at 13:45

1 Answers1

0

Following @NiKiZe's advice, I had the following recipe working (on VMWare). Partitions on the 3 disks The resulting devices are such:

~$ lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
sda       8:0    0    5G  0 disk
├─sda1    8:1    0  4.5G  0 part
│ └─md0   9:0    0    9G  0 raid5 /
├─sda2    8:2    0   95M  0 part  /boot
└─sda3    8:3    0  446M  0 part  /boot/efi
sdb       8:16   0    5G  0 disk
├─sdb1    8:17   0  4.5G  0 part
│ └─md0   9:0    0    9G  0 raid5 /
└─sdb2    8:18   0  541M  0 part  [SWAP]
sdc       8:32   0    5G  0 disk
├─sdc1    8:33   0  4.5G  0 part
│ └─md0   9:0    0    9G  0 raid5 /
└─sdc2    8:34   0  541M  0 part  [SWAP]

Installation on BIOS

Installing software RAID5 on a BIOS machine is comparatively straightforward (see below) and grub seems to be able to run on the RAID volume. There is something I don’t get.

~$ lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
sda           8:0    0    5G  0 disk
├─sda1        8:1    0    1K  0 part
└─sda5        8:5    0    5G  0 part
  └─md0       9:0    0   10G  0 raid5
    ├─md0p1 259:0    0    8G  0 part  /
    ├─md0p2 259:1    0    1K  0 part
    └─md0p5 259:2    0    2G  0 part  [SWAP]
sdb           8:16   0    5G  0 disk
├─sdb1        8:17   0    1K  0 part
└─sdb5        8:21   0    5G  0 part
  └─md0       9:0    0   10G  0 raid5
    ├─md0p1 259:0    0    8G  0 part  /
    ├─md0p2 259:1    0    1K  0 part
    └─md0p5 259:2    0    2G  0 part  [SWAP]
sdc           8:32   0    5G  0 disk
├─sdc1        8:33   0    1K  0 part
└─sdc5        8:37   0    5G  0 part
  └─md0       9:0    0   10G  0 raid5
    ├─md0p1 259:0    0    8G  0 part  /
    ├─md0p2 259:1    0    1K  0 part
    └─md0p5 259:2    0    2G  0 part  [SWAP]