Attaching and Mounting an EBS Volume to Ubuntu EC2 Instance

Good instructions in this StackOverflow thread on adding a Volume to an Amazon EC2 Instance. We're going to mount the newly created 8GB volume to the existing 8GB volume.

Before we get to the command line we attach it using the EC2 Action -> Attach Volume menu.

SSH to the EC2 Instance.

Here are a few helpful commands. See the StackOverflow thread for context and additional tips.

# to view disk information
$ sudo fdisk -l 

# must put a filesystem on it
$ sudo mkfs -t ext4 /dev/xvdf

# now it can be mounted
$ sudo mount /dev/xvdf /mnt/dir/


Posted April 14, 2017 03:19 PM EDT

More Like This Post