Created
April 4, 2018 12:12
-
-
Save mnebuerquo/9b16e56d8b0d7fe1e5fd355dcb325944 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/sh | |
# find out if we're sudo | |
if [ $(id -u) -ne 0 ]; then | |
echo "Nope. Simon didn't say so."; | |
exit 1; | |
fi | |
target="/dev/md0" | |
mountpoint="/data" | |
dev1="/dev/xvdb" | |
dev2="/dev/xvdc" | |
mdadm --create "${target}" --level=0 --raid-devices=2 "${dev1}" "${dev2}" | |
mkfs.ext4 /dev/md0 | |
mkdir -p "${mountpoint}" | |
mount "${target}" "${mountpoint}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment