Created
April 16, 2017 19:04
-
-
Save denniswebb/e0fdcbcfec22c8f9bdd1e2ebbc267a50 to your computer and use it in GitHub Desktop.
Userdata for configuring RAID0 on AWS i3.8xlarge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
mkdir -p /data | |
mdadm --create --verbose --level=0 /dev/md0 --name=DATA --raid-devices=4 /dev/nvme0n1 /dev/nvme1n1 /dev/nvme2n1 /dev/nvme3n1 | |
mdadm --wait /dev/md0 | |
mkfs.ext4 /dev/md0 | |
mdadm --detail --scan >> /etc/mdadm.conf | |
dracut -H -f /boot/initramfs-$(uname -r).img $(uname -r) | |
echo /dev/md0 /data ext4 defaults,nofail,noatime,discard 0 2 >> /etc/fstab | |
mount -a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to increase the size of raid like i created a raid with the script, now i want to add one more disk into raid without losing old disk data.
Is it possible?