MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

EC2 – EBS Volume Demo:

In this tutorial we are going to Explore and setup extra volume to EC2 instance

Step 1 – Login to AWS console, launch EC2 launch wizard page.

AWS EC2 dashboard in the new console showing resources and the Launch instance button
New EC2 console

Step 2 – Launch and Ec2 instance – traverse to Storage selection block.

It will look something like this, and default view where an EC2 is having root volume only

EC2 launch wizard Add Storage step showing only the default 8 GiB gp2 root volume

Now we will add another volume – click on add new volume button

Have added another EBS volume, of size 2gb and of type GP2. Termination protection is on – means it will be terminated if and when EC2 instance gets terminated.

Device column stores information about the path where we would be mounting the addition volume.

Snapshot column gives us option about taking base backup snapshot – new volume would be created from that . More on this in the upcoming EBS tutorials Stay Tuned 🙂

EC2 Add Storage step with a new 2 GiB gp2 EBS volume on /dev/sdb added below the root volume

Launch the EC2 instance now, keep the key pair handy. SSH into the EC2 once its initialised.

Step 3 – Setting up the new addition volume in the EC2.

After SSH, you will have window like below, I’m using Mac Terminal for SSH. Windows we can use putty.

Mac Terminal SSH login to an Amazon Linux 2 EC2 instance using the aws-demo.pem key

Lets list all the volumes attached to the EC2 instance

// this will return all the volumes attached
$ lsblk Code language: JavaScript (javascript)

We should get something like this, if not trying going back to EC2 details and see if you have missed anything in Step 2 above.

Lsblk output listing 8G root volume xvda mounted at / and unmounted 2G volume xvdb

So it’s showing we have two volumes xvda and xvdb. Out of which xvda is mounted as root volume ‘/’ and the other one is not.

xvdb is the volume which we have selected additional volume.

Now we fill format the new volume with file system type and post the we would mount it. After which can be used.

Follow along with me.

// if this returns data means new added volume is not having file system
$ sudo file -f /dev/xvdbCode language: JavaScript (javascript)

For me it came data after executing above command, as we choose blank in snapshot column.

Let’s create a file system in the volume.

// this will create file system
$ sudo mkfs -t xfs /dev/xvdbCode language: JavaScript (javascript)
Terminal output of sudo mkfs -t xfs /dev/xvdb creating an XFS file system on the new volume

We will create mount point, to mount this volume.

$ sudo mkdir /newvolume

Mount the volume to this mount point

$ sudo mount /dev/xvdb /newvolume

Let’s try to list attached volumes now – try lsblk command again.

Lsblk output showing the 2G xvdb volume now mounted at /newvolume

If you see something like this – you are good to go.

Thank you for reading, Have a great day and and awesome year !!

Gaurav Bajpai

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
MotoShare.in offers unparalleled convenience and affordability in bike rentals, allowing users to enjoy hassle-free rides for commuting, exploring, or leisure trips. With a wide range of bikes and scooters, it’s your trusted partner for all two-wheeler needs.

Related Posts

AWS Tutorials: EBS – Steps to Increase the Disk Size on a Running EC2 Instance:

you can increase the disk size of an Amazon EC2 instance while it is running. Amazon allows you to modify the size of an Elastic Block Store…

Read More

AWS Tutorial: Auto mount EBS Volume to ec2 Linux instance on Reboot

By default on every reboot, the EBS volumes other than root volume will get unmounted. To enable automount, you need to make an entry in the /etc/fstab…

Read More

AWS Tutorial: How to Attach and Mount an EBS volume to EC2 Linux Instance?

Step 1 – Create a Volume Step 2 – Attach a Volume to EC2 Instance Step 3 – Verify if Volume is attached or not Verify if…

Read More

EC2 Boot from EBS Explained: Architecture, Trade-offs, and an AWS CLI Workflow

Booting Amazon EC2 instances from Amazon EBS was a major shift from ephemeral root disks to persistent root volumes. This guide explains what changed, why it mattered, and how to use the model safely in modern operations.

Read More

Cloud Tools Adds Amazon EBS Support: Durable EC2 Storage for Database Workloads

This historical update covers when Cloud Tools introduced Amazon EBS support for EC2 applications, including database-backed deployments. It explains the supported storage modes, the backup/restore flow, and practical command-level equivalents.

Read More

AWS Storage: FAQ

Can u attach Aws vm or you can’t attach disks to a running VM? Yes, you can attach EBS volumes to running EC2 instances in AWS. This…

Read More