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..
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?
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"
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.
Step 2: Identify AWS Availability Zone
Go to storage section, find how many EBS volumes have been attached to aws EC2.
So primarily you'll be having a root EBS volume and also identify the availability zone of EC2 instance where it is running.
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
Go to volumes and Click on Create volume.
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.
This will generate new Volume id for newly created AWS EBS Volume.
Go to volumes again to verify the state of newly created AWS EBS Volume. it should be in 'available' state for now.
Search for the instance with name or instance id. Finally click on attach to proceed further.
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
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 mount /dev/xvdf /mnt
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 Request you to go through the below recommended tutorial, if you are interested in learning.
DevOps Full Course Tutorial for Beginners - DevOps Free Training Online
Docker Full Course Tutorial for Beginners - Docker Free Training Online
Kubernetes Full Course Tutorial for Beginners - Kubernetes Free Training Online
Ansible Full Course Tutorial for Beginners - Ansible Free Training Online
Openstack Full Course Tutorial for Beginners - Openstack Free Training Online
Docker Full Course Tutorial for Beginners - Docker Free Training Online
Kubernetes Full Course Tutorial for Beginners - Kubernetes Free Training Online
Ansible Full Course Tutorial for Beginners - Ansible Free Training Online
Openstack Full Course Tutorial for Beginners - Openstack Free Training Online
Keep practicing and have fun. Leave your comments if any.
Stay connected with us on social networking sites, Thank you.
0 تعليقات