Skip to content

Instantly share code, notes, and snippets.

@DeviaVir
Created May 6, 2016 21:42
Show Gist options
  • Save DeviaVir/dd4a4f09c20ad5e4291855860991d04a to your computer and use it in GitHub Desktop.
Save DeviaVir/dd4a4f09c20ad5e4291855860991d04a to your computer and use it in GitHub Desktop.
wget https://raw.githubusercontent.com/DeviaVir/asg_persistence/master/attach_volume.py
python attach_volume.py --tag Name --value cb-production --attach_as /dev/sdf
mkdir -p /data/db/
mount /dev/xvdf /data/db
if [ $? -eq 0 ]; then
echo 'Using existing drive'
else
mkfs -t ext4 /dev/xvdf
mount /dev/xvdf /data/db
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment