Skip to content

Instantly share code, notes, and snippets.

@rms1000watt
Created April 19, 2019 17:44
Show Gist options
  • Save rms1000watt/a00b52aa192cfce7e6a5d693dcb5f18d to your computer and use it in GitHub Desktop.
Save rms1000watt/a00b52aa192cfce7e6a5d693dcb5f18d to your computer and use it in GitHub Desktop.
Volume Mount AWS NVMe SSD and point docker to run from it
if [[ ${disk_ephemeral} -eq 1 ]]; then
echo "START: Mount the ephemeral disk"
sudo mkfs.ext4 /dev/nvme0n1
sudo mount -t ext4 /dev/nvme0n1 /opt
echo '/dev/nvme0n1 /opt auto noatime 0 0' | sudo tee -a /etc/fstab
sudo mount -a
sudo chmod -R 777 /opt
echo "DONE: Mount the ephemeral disk"
mkdir -p /etc/docker
echo '{"log-driver":"json-file","log-opts":{"max-size":"10m"},"data-root":"/opt/docker"}' > /etc/docker/daemon.json
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment