Resize Root Partition
My EC2 Linux instance is running out of disc space. We forgot to add a larger disc capacity at first, therefore it was launched with the usual 8GB disc. Our system now needed additional disc space to function correctly.
This tutorial will walk you through how to resize root partition of an Amazon EC2 Linux instance.
Create a Full Backup of your Instance
Before resizing the root volume, you should create a full backup (AMI) of your instance. This will assist you in recovering from any unexpected problems.
Now, on your EC2 Linux system, use one of the methods listed below to resize the root disc.
Resize Root Disc with Disk Snapshot
- Stop your instance.
- Create a snapshot from a volume by going to volumes. Volume details can be found in your instance description.
- Navigate to Snapshots and wait for the snapshot to finish. After that:
- From the freshly produced snapshot, create a new volume.
- In the Size (GiB) column, change the size.
- Set the correct availability zone. It must be the same as the one in which your instance is operating.
- Now select “Create Volume”.
- Attach a new volume to your instance as the root volume.
- Start the instance.
Use Instance AMI to resize the root disc
A new instance will be launched using this method. The instance ID will be changed in that case.
- Create a virtual machine image (VMI) of your instance.
- Go to the pages of AMI. Create a new instance from the AMI after it’s been built.
- In the wizard’s Add Store step, you must specify a new disc size.
- To start your instance, follow the wizard’s instructions.
- After the instance has been launched, you may need to swap the elastic IP from the old instance.
Verify Disc Size
Your root volume has been successfully resized at this point. Now verify that your disc has been correctly resized.
Saad Shafqat
Related posts
New Articles
How to Opt-Out of USPhonePro in 2024
In an age where our personal information is more accessible than ever, the ability to control how it’s used—and by…