Skip to content

Instantly share code, notes, and snippets.

@tianhaoz95
Created January 23, 2022 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tianhaoz95/4372dccf6589e89540ce3c0d79a36177 to your computer and use it in GitHub Desktop.
Save tianhaoz95/4372dccf6589e89540ce3c0d79a36177 to your computer and use it in GitHub Desktop.
# Install the mdadm library
sudo apt-get install mdadm
# Note down the names and UUIDs of the drives that we want to use as RAID
sudo blkid
# Create virtual RAID storage device
sudo mdadm --create --verbose /dev/md/vol1 --level=0 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
# Check if the device has been successfully created
sudo mdadm --detail /dev/md/vol1
# Format the mounted virtual RAID storage device
sudo mkfs.ext4 -v -m .1 -b 4096 -E stride=32,stripe-width=64 /dev/md/vol1
# Mount the virtual RAID storage device
sudo mount /dev/md/vol1 /mnt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment