Wednesday, 19 July 2017

thumbnail

How to extend-resize Linux root partition on AWS EC2

How to extend-resize Linux root partition on AWS EC2


In this tutorial we will see how to increase or resize the linux root partition on aws ec2 instance using aws webconsole. 

You must have running instance to resize your root partition. For testing purpose you can launch an free tier linux instance.

In this scenario I have launched an ubuntu free tier instance with 8gb volume size root partition as you can see in the below image 

1. First note down some important things like below :-

1. Avaibality zone :- us-west-2c
2. Instance ID :- i-00fbe20bba17f353b
3. Root device :- /dev/sda1


2.  To resize it to 16gb we need to stop the instance :-

Select the instance and hover over Action menu and you will see "Instance state" hover your mouse and select "Stop"


3. Go to EBS Block Storage and select Volumes to take snapshot :-



Next fill in the name and description of  your snapshot like below




Check the status of the snapshot whether it is in "pending" state or completed. It should be in the completed state to resize partition.


4. Create a New Volume by selecting taken snapshot :-


You will have a pop window where you have enter the new size that you want for your partition and you have to select the same zone which have noted earlier in step 1.



On successfull creation you have pop like below 


5. Now you have to detach the Old volume :-


 Yes to confirm



6. Now attach New Volume with 16 GB in size in the same instance and select the same zone as well :-




This is very important pop up will appear please remember to write proper root partition which you noted in step 1.


After the successfull attachment you will see in-use state in new volume.

7. Lastly start the instance which we have stopped.



As we have instance in running state and we can now check partition size in our instance by logging in with ssh.

 
As you can see in the image above the size of the volume has been increased from 8GB to 16GB successfully. 


Those who are testing please remove the the snapshot and volume which you have created when your work is finished otherwise it will be charged.

That's it enjoy using it.
Please do Comments,Like and Share.



Subscribe by Email

Follow Updates Articles from This Blog via Email

No Comments

Follow by Email