Skip to content

Instantly share code, notes, and snippets.

@kenjiskywalker
Last active December 14, 2015 11:49
Show Gist options
  • Select an option

  • Save kenjiskywalker/5081937 to your computer and use it in GitHub Desktop.

Select an option

Save kenjiskywalker/5081937 to your computer and use it in GitHub Desktop.
EC2 ephemeral disk for RAID0 mount on boot.
#!/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