- This guide is based on Debian 11 (Bullseye) and is designed to be used with Scaleway/OneProvider as the cloud provider.
- We will be transitioning from RAID1 to RAID0 on SSD. It's vital to verify that your hosting solution supports the RAID configuration you're about to implement.
- Also, remember to back up any data stored on the drives as the RAID configuration changes could result in data loss.
- Here are the steps to follow, with appreciation to @danaelg for their contributions.
- /dev/md126 (typically md0) = /boot (RAID 1)
- /dev/md127 (typically md1) = / (RAID 1 which will be switched to RAID0 and become md1)
Activate "Boot in rescue mode" from your cloud provider's interface.
mkdir /mnt/md127
mount /dev/md127 /mnt/md127
rsync -aHAXxv /mnt/md127/ /mnt/newraid
umount /mnt/md127
mdadm --stop /dev/md127
mdadm --verbose --create /dev/md1 --level=0 --raid-devices=2 /dev/sda2 /dev/sdb2
- Validate with cat
/proc/mdstat
mkfs.ext4 /dev/md1
mkdir /mnt/md1
mount /dev/md1 /mnt/md1
rsync -aHAXxv /mnt/newraid /mnt/md1
lsblk -f
Preserve this for future reference
nano /mnt/md1/etc/fstab
UUID=XXX / ext4 defaults 0 0 INFO Use the /etc/fstab of the rescue mode to test and verify the syntax
mount --bind /dev /mnt/md1/dev
mount --bind /proc /mnt/md1/proc
mount --bind /sys /mnt/md1/sys
chroot /mnt/md1 /bin/bash
update-initramfs
update-grub
Switch back to "Boot in normal mode" in your cloud provider's interface.