Create & Mount a New Drive on EC2 (Linux)

Step 1: Create a New EBS Volume
Step 2: Attach Volume to EC2
Step 3: SSH into EC2 and Confirm
Step 4: Format the Disk
Step 5: Create Mount Point & Mount
Step 6: Make Mount Persistent
1.Create Instance.
2.Create a New EBS Volume and attach to EC2 instance.
3: SSH into EC2 and Confirm
To verify used cmd- lsblk
Now it is attach we need to mount it permanent
Step 4: Format the Disk cmd- sudo mkfs.ext4 /dev/xvdbf
Step 5: Create New Drive D and Mount Point & Mount.
cmd- sudo mkdir /mnt/d_drive sudo mount /dev/ xvdbf /mnt/d_drive
Step 6: Make Mount Persistent
cmd- sudo blkid
copy - UUID="f58db4cd-64fe-4116-a0cb-190e4ed9997d" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="86aeec03-9737-47fd-96f1-853748b96950"
Edit the /etc/fstab file
cmd- sudo nano /etc/fstab
Add these line at bottom
Finally D drive is ready and successfully mounted!
✅ Done! Your new EBS volume is now created, formatted, and mounted.
Happy Learning…!
Subscribe to my newsletter
Read articles from Ankita Lunawat directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Ankita Lunawat
Ankita Lunawat
Hi there! I'm a passionate AWS DevOps Engineer with 2+ years of experience in building and managing scalable, reliable, and secure cloud infrastructure. I'm excited to share my knowledge and insights through this blog. Here, you'll find articles on: AWS Services: Deep dives into core AWS services like EC2, S3, Lambda, and more. DevOps Practices: Best practices for CI/CD, infrastructure as code, and automation. Security: Tips and tricks for securing your AWS environments. Serverless Computing: Building and deploying serverless applications. Troubleshooting: Common issues and solutions in AWS. I'm always eager to learn and grow, and I hope this blog can be a valuable resource for fellow DevOps enthusiasts. Feel free to connect with me on [LinkedIn/Twitter] or leave a comment below!