-
-
Save mkdynamic/fcbbe1a37fa22ce2989d to your computer and use it in GitHub Desktop.
Revisions
-
pokle revised this gist
Mar 1, 2014 . 1 changed file with 5 additions and 14 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,21 +1,12 @@ Launch your EC2 EBS instance with two SSDs on the second and third slots (after the root EBS volume), with this in your userdata: #!/usr/bin/env bash umount /dev/xvdb umount /dev/xvdc apt-get install mdadm -y mkdir /u01 cat > /etc/init/mount-ephermal-ssd.conf <<HERE start on virtual-filesystems @@ -40,5 +31,5 @@ Create an upstart configuration to re-initialise the raid device on every boot. end script HERE start mount-ephermal-ssd -
pokle revised this gist
Feb 28, 2014 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,6 @@ Assuming you have an EBS instance for the root filesystem, and you want to mount your SSDs (on /dev/xvdb and /dev/xvdc) as raid0 every boot/reboot. Remove the last line of /etc/fstab that refers to /dev/xvdb, and unmount your devices if they are mounted. umount /dev/xvdb -
pokle created this gist
Feb 28, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ Assuming you have an EBS instance for the root filesystem, and you want to mount your SSDs (on /dev/xvdb and /dev/xvdc) as raid0 every boot/reboot. Prep ==== Remove the last line of /etc/fstab that refers to /dev/xvdb, and unmount your devices if they are mounted. umount /dev/xvdb umount /dev/xvdc mdadm isn't installed by default. apt-get install mdadm -y We're going to mount at /u01 mkdir /u01 Create an upstart configuration to re-initialise the raid device on every boot. cat > /etc/init/mount-ephermal-ssd.conf <<HERE start on virtual-filesystems script # Attempt a short circuit mount - one of these works # after a reboot mount /dev/md127 /u01 && exit mount /dev/md0 /u01 && exit # It's possible this was a EC2 STOP/START - create everything from scratch # Although we specify md0, the actual device may be md127 upon reboot!!! yes | mdadm --create --verbose --force /dev/md0 --level=0 --raid-devices=2 /dev/xvdb /dev/xvdc # Last chance mount /dev/md127 /u01 && exit mount /dev/md0 /u01 && exit # Clean FS mkfs.ext4 /dev/md0 mount /dev/md127 /u01 && exit mount /dev/md0 /u01 && exit end script HERE Now just reboot (to test it all works)