How to Attach AWS EBS Volume to AWS EC2 Instances

how to attach ebs volume to aws ec2 instance, attach ebs volume to linux instance, ebs volume, how to create aws ebs volume, Attach AWS EBS Volume

On some cases we may need to add additional new EBS volume to a EC2 instances. This post will help you with how to add or attach additional AWS EBS Volume to running AWS EC2 Instances..

How to Attach AWS EBS Volume to AWS EC2 Instances

End of the post, you would be able to understand,

1. How to create new AWS EBS volume?
2. How to attach AWS EBS volume to any running EC2 instances?
3. How to create filesystem on AWS EBS volume?
4. How to mount AWS EBS volume on EC2 instances?

Also You can watch this tutorial demo video on our YouTube Channel.
"How to Attach AWS EBS Volume to AWS EC2 Instances"

Step 1: Select correct EC2 instance

Make sure you have selected the correct EC2 instances to which we are going to add additional or new aws EBS volume.

How to Attach AWS EBS Volume to AWS EC2 Instances


Step 2: Identify AWS Availability Zone

Go to storage section, find how many EBS volumes have been attached to aws EC2. 

How to Attach AWS EBS Volume to AWS EC2 Instances

So primarily you'll be having a root EBS volume and also identify the availability zone of EC2 instance where it is running. 

How to Attach AWS EBS Volume to AWS EC2 Instances

We can attach multiple aws EBS volumes to a single instances but the volumes we create and the instance must be in the same availability zone.

Step 3: Create new AWS EBS Volume

[ads-post]

Go to volumes and Click on Create volume.

How to Attach AWS EBS Volume to AWS EC2 Instances

Specify new AWS EBS Volume details like Volume type, size, IOPS, Throughput, Availability Zone and other info as you prefered. Dont forget to select the right availability zone of our EC2 is running.

How to Attach AWS EBS Volume to AWS EC2 Instances


Once you entered all details, just click on create volume.


How to Attach AWS EBS Volume to AWS EC2 Instances

This will generate new Volume id for newly created AWS EBS Volume.

How to Attach AWS EBS Volume to AWS EC2 Instances

Go to volumes again to verify the state of newly created AWS EBS Volume. it should be in 'available' state for now.

How to Attach AWS EBS Volume to AWS EC2 Instances

Step 4: Attach new AWS EBS Volume

Go to actions, Click on Attach volume.

How to Attach AWS EBS Volume to AWS EC2 Instances


Search for the instance with name or instance id. Finally click on attach to proceed further.


How to Attach AWS EBS Volume to AWS EC2 Instances

Note: Volume Status will be changed from "Available" to "In Use".

Step 5: Create filesystem & mount AWS EBS Volume on AWS EC2

Login into EC2 instance and find the new device id that is created by OS kernel using "fdisk -l" or "lsblk" commands.

sudo lsblk
sudo fdisk -l

How to Attach AWS EBS Volume to AWS EC2 Instances

In order to mount this volume we have to create a file system. Lets create a xfs file system type on this EBS volume.

sudo mkfs.xfs /dev/xvdf

How to Attach AWS EBS Volume to AWS EC2 Instances

Mount volume on a target directory using mount command.

sudo mount /dev/xvdf /mnt

How to Attach AWS EBS Volume to AWS EC2 Instances

Hope this post helped you with How to Attach AWS EBS Volume to AWS EC2 Instances. Keep practicing and have fun. Leave your comments if any.

Also refer other articles,

What is Docker - Get Started from Basics - Docker Tutorial
What is Container, What is Docker on Container - Get Started
How to Install Docker on CentOS 7 / RHEL 7
Docker Images Explained with Examples - Docker Tutorial
Dockerfile Instructions Explained with Examples
Docker ONBUILD Command Explained with Examples
Docker ARG vs ENV Command Differences Explained in Detail
Docker CMD & ENTRYPOINT Differences Explained in Detail
How to Run Docker Containers - Explained with Examples

Support Us: Share with your friends and groups.

Stay connected with us on social networking sites, Thank you.
YouTube | Facebook | Twitter | Pinterest | Rss

Incoming Searches: attach ebs to multiple ec2, attach ebs to ec2 instance, how to attach ebs volume to ec2 instance, attach ebs volume to ec2 instance linux, attach ebs volume to linux instance, how to mount aws ebs volume, how to add additional ebs volume, add ebs volume to ec2 instance, add ebs volume to ec2 linux instance, mount ebs volume on linux instance, ebs volume in aws, ebs volume mount, how to create aws ebs volume, ec2 ebs volume

August 31, 2021

Post a Comment

[disqus][facebook][blogger]

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget