Skip to content

Setup data volumes in EC2

Arnau Sanchez edited this page Jun 23, 2017 · 1 revision

AWS Setup

Manage your volumes and attach them to the EC2 instances: EC2 -> Elastic Block Store -> Volumes.

Amazon Linux Setup

Example with /dev/xvdf -> data:

# mkdir /data

Edit /etc/fstab and add this entry:

# /dev/xvdf   /data       ext4    defaults,nofail 0   2

Mount and move the data:

# mount /data
# cp ...
# chwon ...

Make sure (with chown) that the moved data has the correct permissions on /data.