Trending News
By using our website, you agree to the use of our cookies.

Blog

How to Easily Resize Root Partition in Amazon EC2 on Linux [ Easy Guide ]
Guide

How to Easily Resize Root Partition in Amazon EC2 on Linux [ Easy Guide ] 

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.

Table of Contents

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

  1. Stop your instance.
  2. Create a snapshot from a volume by going to volumes. Volume details can be found in your instance description.
  3. Navigate to Snapshots and wait for the snapshot to finish. After that:
  4. From the freshly produced snapshot, create a new volume.
  5. In the Size (GiB) column, change the size.
  6. Set the correct availability zone. It must be the same as the one in which your instance is operating.
  7. Now select “Create Volume”.
  8. Attach a new volume to your instance as the root volume.
  9. 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.

  1. Create a virtual machine image (VMI) of your instance.
  2. Go to the pages of AMI. Create a new instance from the AMI after it’s been built.
  3. In the wizard’s Add Store step, you must specify a new disc size.
  4. To start your instance, follow the wizard’s instructions.
  5. 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.

				
					df -h 
				
			
Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on reddit
Share on vk
Share on tumblr
Share on skype
Share on stumbleupon
Share on whatsapp
Share on email

Related posts

Leave a Reply