Building RAID 50 on Ubuntu. How can I go about it?

I am building a RAID 50 array for my Ubuntu server. I got me some four brand new Samsung PM9A3 2TB NVMe SSDs. It is meant to enable efficiency for a video editing workflow.

How do I go about the configuration process. I am using the mdadm commands. Pretty straightforward but the challenge is ability to manage individual drives within the nested RAID 0 and RAID 5.

Is there a simple way to streamline the entire process?

You can use LVM to streamline this with this step by step setup

  1. You would first of all have to partition each SSD: Use the command below

sgdisk -n 1:0:0 /dev/sdX
(repeat for all disks)

  1. After that, you should create 2 RAID 5 arrays:

mdadm --create /dev/md0 --level=5 --raid-devices=2 /dev/sdX /dev/sdY
(repeat for remaining disks)

  1. The next step is to turn RAID devices into physical volumes:

pvcreate /dev/md0 (repeat for md1)

  1. Combine PVs into a volume group: Use this command

vgcreate vg0 /dev/md0 /dev/md1

  1. Create a logical volume with the command below

lvcreate -L 100%FREE -n lv0 vg0

  1. And finally, format and mount the logical volume:

mkfs.ext4 /dev/vg0/lv0; sudo mkdir /mnt/raid50; sudo mount /dev/vg0/lv0 /mnt/raid50

hm. @Slys The minimum number of drives needed for a RAID 50 array is six.

This requirement stems from its nested structure: RAID 50 combines the distributed parity of RAID 5 with the striping of RAID 0.

Since a RAID 5 array requires at least three drives (to allow for one drive’s worth of parity data), and RAID 50 stripes across two such RAID 5 sets, you need at least two sets of three drives.

1 Like