Last active
December 14, 2015 11:49
-
-
Save kenjiskywalker/5081937 to your computer and use it in GitHub Desktop.
EC2 ephemeral disk for RAID0 mount on boot.
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 | |
| #################################### | |
| ### for example . | |
| ### --------------------- | |
| ### /dev/xvda1 / | |
| ### /dev/xvda none | |
| ### /dev/xvdc ephemeral | |
| ### /dev/xvdd ephemeral | |
| ### --------------------- | |
| #################################### | |
| yes | mdadm --create /dev/md127 --level=0 --raid-devices=2 /dev/xvd[cd] | |
| mkfs.ext4 /dev/md127 | |
| mount /dev/md127 /mnt/ | |
| ### remove | |
| # $ mdadm --misc --stop /dev/md127 | |
| # mdadm: stopped /dev/md127 | |
| # $ cat /proc/mdstat | |
| # Personalities : [raid0] | |
| # unused devices: <none> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment