- boot into BIOS
- change PCIe link width configuration to
x4x4x4x4
- partition drives
- create and start raid0 array
- make configuration persistent between reboots
- double check before committing too much data into the array
-
-
Save hitorilabs/dff5328a447450d649da0ee55d5228d4 to your computer and use it in GitHub Desktop.
Wipe all partitions from the drives and create new ones
sudo gdisk
Example for initial creation of a raid0 array (really you should have a 4 slot adapter here for a PCIe x16 slot)
sudo mdadm --create --verbose --level=0 --raid-devices=4 /dev/md0 /dev/nvme0n1p1 /dev/nvme1n1p1 /dev/nvme2n1p1 /dev/nvme3n1p1
sudo mkfs.ext4 -m 0 -E lazy_itable_init=0,lazy_journal_init=0 /dev/md0
sudo mkdir /mnt/md0
sudo mount /dev/md0 /mnt/md0
/etc/fstab
- you can pretty safely do this and it won't change
...
/dev/md0 /mnt/md0 ext4 defaults,nofail,discard 0 0
Note: ORDER MATTERS... (check that there aren't duplicate array definitions - don't specify verbose, it only caused issues)
sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf
(may or may not be necessary)
sudo update-initramfs -u
Recovering a raid array that wasn't persisted, you can run the same command (seems wrong but it worked)
sudo mdadm --create --verbose --level=0 --raid-devices=4 /dev/md0 /dev/nvme0n1p1 /dev/nvme1n1p1 /dev/nvme2n1p1 /dev/nvme3n1p1
https://www.jeffgeerling.com/blog/2021/htgwa-create-raid-array-linux-mdadm
No idea why it's not autoassembling, but I can just do sudo mdadm --assemble /dev/md0
by name and then mount it to /mnt/md0
EDIT: skill issue - i tee'd the config before mounting sudo mount /dev/md0 /mnt/md0