Created
March 16, 2012 00:14
-
-
Save tovbinm/2047800 to your computer and use it in GitHub Desktop.
EC2
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/bash | |
apt-get -y update | |
apt-get -y install mdadm | |
echo "y" | mdadm --create /dev/md0 --level 0 --raid-devices 2 /dev/xvdb /dev/xvdc | |
echo "DEVICE /dev/xvdb /dev/xvdc" > /etc/mdadm/mdadm.conf | |
mdadm --detail --scan >> /etc/mdadm/mdadm.conf | |
blockdev --setra 65536 /dev/md0 | |
mkfs.ext3 -F /dev/md0 | |
mkdir -p /mnt/dataraid && mount -t ext3 /dev/md0 /mnt/dataraid -o noatime | |
echo "/dev/md0 /mnt/dataraid ext3 noatime 0 0" | tee -a /etc/fstab |
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
ec2-run-instances ami-1cbc4375 -b '/dev/sdb=ephemeral0' -b '/dev/sdc=ephemeral1' -t m1.large -g <security-group> -k <ec2-key-name> -z us-east-1d -K ./pk-***.pem -C ./cert-***.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment