Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

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 Volume is attached or not by running linux command in Ec2-instance

$ lsblk

Step 4 – Check if the volume has any data using the following command.

If the above command output shows “/dev/xvdf: data“, it means your volume is empty.

$ sudo file -s /dev/xvdf

ubuntu@ip-172-31-3-136:~$ lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
loop0          7:0    0   74M  1 loop /snap/core22/2411
loop1          7:1    0 28.2M  1 loop /snap/amazon-ssm-agent/13009
loop2          7:2    0 28.4M  1 loop /snap/amazon-ssm-agent/13349
loop3          7:3    0 49.3M  1 loop /snap/snapd/26865
nvme0n1      259:0    0    8G  0 disk 
├─nvme0n1p1  259:1    0  6.9G  0 part /
├─nvme0n1p13 259:2    0 1023M  0 part /boot
├─nvme0n1p14 259:3    0    4M  0 part 
└─nvme0n1p15 259:4    0  106M  0 part /boot/efi
nvme1n1      259:5    0    5G  0 disk 
ubuntu@ip-172-31-3-136:~$ sudo file -s /dev/nvme1n1
/dev/nvme1n1: data
ubuntu@ip-172-31-3-136:~$ 

Step 5: Format the volume to the ext4 filesystem using the following command.

Alternatively, you can also use the xfs format. You have to use either ext4 or xfs.

$ sudo mkfs -t ext4 /dev/xvdf
$ sudo mkfs -t xfs /dev/xvdf

Step 6: Create a directory of your choice to mount our new ext4 volume. I am using the name “newvolume“. You can name it something meaningful to you.

$ sudo mkdir /newvolume

Step 7: Mount the volume to “newvolume” directory using the following command.

$ sudo mount /dev/xvdf /newvolume/

Step 8: cd into newvolume directory and check the disk space to validate the volume mount.

$ cd /newvolume
$ df -h .

The above command should show the free space in the newvolume directory.
To unmount the volume, use the unmount command as shown below..
umount /dev/xvdf

Mount one EBS volume to Multiple EC2 Instances

If you have any use case to mount an EBS volume to multiple ec2 instances, you can do it via EBS multi-attach functionality.

This option only serves specific use-cases where multiple machines need to read/write to the same storage location concurrently.

EBS multi attach option is available only for Provisioned IOPS (PIOPS) EBS volume types.

Note: EBS multi-attach does not support XFSEXT2EXT4, and NTFS file systems. It supports only cluster-aware file systems.

Find Trusted Cardiac Hospitals

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

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Top 10 AI SEO Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI SEO tools have become indispensable for digital marketers, businesses, and content creators aiming to dominate search engine rankings. These tools leverage artificial intelligence…

Read More

Top 10 Product Lifecycle Management (PLM) Tools in 2026: Features, Pros, Cons & Comparison

Introduction Product Lifecycle Management (PLM) is a strategic approach to managing a product’s journey from conception through design, manufacturing, and end-of-life. In 2026, PLM software has evolved…

Read More

Top 10 Patch Management Tools in 2026: Features, Pros, Cons & Comparison

Introduction: The Importance of Patch Management in 2026 In 2026, as cyber threats evolve and technology becomes more complex, patch management tools are critical for maintaining cybersecurity…

Read More

Top 10 Headless CMS Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, Headless Content Management Systems (CMS) have become the go-to solution for businesses seeking flexibility, scalability, and a modern approach to content management. Unlike traditional…

Read More

Top 10 AI Lead Scoring Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI lead scoring tools have become indispensable for B2B and B2C businesses aiming to optimize their sales pipelines. These tools leverage artificial intelligence to…

Read More

Top 10 AI Portfolio Optimization Tools in 2026: Features, Pros, Cons & Comparison

Introduction Investment management has always been about making smart choices at the right time. Traditionally, this required endless hours of research, manual calculations, and intuition. But in…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x