Skip to content

Instantly share code, notes, and snippets.

@matthewoestreich
Last active August 23, 2020 23:16
Show Gist options
  • Save matthewoestreich/1e6f7d934ded2a44df23b02be789f63e to your computer and use it in GitHub Desktop.
Save matthewoestreich/1e6f7d934ded2a44df23b02be789f63e to your computer and use it in GitHub Desktop.
Create mdadm raid array Ubuntu 20.04
# Credit to https://www.youtube.com/watch?v=o_PnB7bHhA0
# create raid based upon drives
sudo mdadm --create /dev/md1 --level=1 --raid-devices=4 /dev/sd[a-d]
# list drives
lsblk
# get status of raid setup
# CHANGE md0 TO WHATEVER YOU WANT TO CALL THE PARTITION
sudo mdadm --details /dev/md1
# can also do
# CHANGE md0 TO WHATEVER YOU WANT TO CALL THE PARTITION
sudo watch mdadm --details /dev/md1
# After done syncing format raid into ext4 partition
sudo mkfs.ext4 -v /dev/md1
# mount drive
sudo mkdir /mnt/raid1 # you can interchange raid1 with whatever you want to name your logical drivce
sudo mount /dev/md1 /mnt/raid1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment