How to increase storage of AWS EC2 server without deleting data

Search for a command to run...

No comments yet. Be the first to comment.
Sprint planning and streamlining the sprint process are paramount tasks in a startup. Key objectives include efficiently managing resources, accelerating time to market, and fostering adaptability. Clear planning aligns the team, ensures product qual...

Too many tools exist to get webhooks from a 3rd party app. Here are some fantastic tools that have become essential in my daily. webhook.site This is a really handy tool to explore the body of the received webhooks. You can forward webhooks to your...

I found it relatable when Julie Zhuo said, Would you tell your personal trainer, “Oh, I’m pretty fit, I’ve got it under control” when she asks you how she can help you achieve a better workout? Of course not. That is not how a coaching relationship ...

In a large project with multiple developers, effective Git management is crucial for streamlined collaboration. A well-organized Git process ensures developers can work concurrently on various features, minimizing conflicts and enhancing productivity...

In this tutorial, I'll walk you through the steps required to increase the volume size of your EC2 instance on Amazon Web Services (AWS). As my storage needs grow, it's essential to be able to scale up my resources easily and efficiently. I'll be focusing on increasing my Elastic Block Store (EBS) storage and extending the partition accordingly.
Before we begin, make sure you have the following:
Access to an AWS account with appropriate permissions.
An EC2 instance with Elastic Block Store (EBS) is attached.
Take a snapshot of your EBS ( just in case :) )
Log in to your AWS Management Console.
Navigate to the EC2 dashboard.
Select the instance for which you want to increase the volume size.
In the details pane, locate the EBS volume attached to your instance.
Click on Modify
Once I've modified the volume size, follow these steps to resize the partition on my EC2 instance:
Open your terminal and SSH into your EC2 instance.
Run the following command to check the current disk layout:
lsblk
Use the following command to extend the partition:
sudo growpart /dev/nvme0n1 1
Replace /dev/nvme0n1 with your disk identifier if it's different.
Check the file system usage with:
df -hT
Finally, resize the file system using:
sudo resize2fs /dev/root
Replace /dev/root with your root file system if it's different.
It's crucial to monitor your storage usage regularly and adjust resources accordingly to ensure optimal performance and scalability.
For more detailed information, you can refer to the official AWS documentation.
If you have any questions or suggestions, feel free to leave them in the comments section below or connect with me on LinkedIn