Skip to content

Instantly share code, notes, and snippets.

@jamiekurtz
Created October 15, 2016 23:15
Show Gist options
  • Save jamiekurtz/4c10f0d760a7b554e5b741a2d1a79e92 to your computer and use it in GitHub Desktop.
Save jamiekurtz/4c10f0d760a7b554e5b741a2d1a79e92 to your computer and use it in GitHub Desktop.
Used to mount AWS EBS volume on EC2 Ubuntu
#!/usr/bin/env bash
DEVICE=/dev/xvdf
FOLDER=/data/stuff
sudo mkfs -t ext4 $DEVICE
sudo mkdir -p $FOLDER
echo "$DEVICE $FOLDER ext4 defaults,nofail 0 2" | sudo tee --append /etc/fstab > /dev/null
sudo mount -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment