Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -ue
#
# this script will attempt to detect any ephemeral drives on an EC2 node and create a RAID-0 stripe.
# It should be run once to setup the RAID, and automatically mount on reboot without further intervention.
#
# Beware, This script is NOT fully idempotent.
#
mount_point=${1:-"/mnt/storage"}
METADATA_URL_BASE="http://169.254.169.254/latest"