

Sudo mdadm -create -verbose /dev/md0 -level=10 -raid-devices=4 /dev/sd1 # Create a RAID 10 array using four drives. I'm going to create a RAID 10 array for my own use-you can check out the associated video linked above for the reasons why I chose RAID 10 instead of something else. Using Linux's Multiple Device admin tool ( mdadm), we can put these drives together in any common RAID arrangement. Create a RAID device using mdadmĪt this point, we have four independent disks, each with one partition spanning the whole volume.


There are ways you can script fdisk to apply a given layout to multiple drives at the same time, but with just four drives, it's quick enough to go into fdisk, then press n, then press 'enter' for each of the defaults, then w to write it, and q to quit. So for each of my devices ( sda through sdd), I ran fdisk to create one primary partition: $ sudo fdisk /dev/sda but there are a couple small reasons it seems safer that way. Technically it's not required to partition before creating the array. how is there also an NVMe drive there?! Well, I'm also testing some PCI multi-port switches with the Pi-follow that issue for progress.) Partition the drives with fdiskįor each of the drives that were recognized, if you want to use it in a RAID array (which I do), you should add a partition. Once that's done, you should be able to see any drives attached to the card after boot using lsblk, for example: $ lsblk I have full directions for recompiling the kernel with SATA support on the Pi itself, too! Raspberry Pi OS (and indeed, any OS optimized for the Pi currently, like Ubuntu Server for Pi) doesn't include all the standard drivers and kernel modules you might be used to having available on a typical Linux distribution.Īnd the SATA kernel modules are not included by default, which means the first step in using a PCIe card like the IO Crest (which has a Marvell 9215 chip-which is supported in the kernel) is to compile (or cross-compile, in my case) the kernel with CONFIG_ATA and CONFIG_SATA_AHCI enabled. The rest of this blog post will go through some of the details for setup, but I don't have the space in this post to compile all my learnings here-check out the linked issue and video for that! Getting the SATA card working with the Pi
