Since this is a new volume, you need to format the EBS volume (block device) with a file system between step 1 and step 2. So the entire process with your sample mount point is:
-
Create EBS volume.
-
Attach EBS volume to
/dev/sdf(EC2’s external name for this particular device number). -
Format file system
/dev/xvdf(Ubuntu’s internal name for this particular device number):sudo mkfs.ext4 /dev/xvdfOnly format the file system if this is a new volume with no data on it. Formatting will make it difficult or impossible to retrieve any data that was on this volume previously.
-
Mount file system (with update to /etc/fstab so it stays mounted on reboot):
sudo mkdir -m 000 /vol echo "/dev/xvdf /vol auto noatime 0 0" | sudo tee -a /etc/fstab sudo mount /vol