Resize the disk volume of a Linux EC2 Virtual machine

In the blog we will resize the disk volume of a Linux EC2 virtual machine. We will resize the volume of the running Instance in the following picture.

Select the Instance, right click the instance. Stop the Instance by clicking Instance State -> Stop

Now the Instance has been stopped.

Select ELASTIC BLOCK STORE->Volumes. Select the volume that we want to extend and create Spapshot of the volume by clicking Actions->Create Snapshot

Provide the name if the Snapshot. In that example we have given the name "BEFORE RECISE"

In the following picture we can see the snapshot creating, it will take some time based on the size of the storage.

In the following picture we can see the Snapshot has been created.

Now we will create volume from the Snapshot. Select ELASTIC BLOCK STORE->Snapshots. Right click the created Snapshot and click "Create Volume"

In the following picture you can see, it showing the old size of the volume that we are going to increase.

Change the Size to increase the volumen. In that example we have change the size from 18GB to 22GB. Click Create

Now you will see the message "Volume Successfully Created"

In the following picture you can see the newly created volume is available to attach.

Select the volume that we want to resize and Detach the volume. Right click the volume and click Detach Volume.

Click "Yes, Detach"

Right click the newly created volume from Snapshot and click "Attach Volume"

Select the Instance where we want to attach the volume

Provide the name of the Device and click "Attach"

Now start the Instance. Right click the Instance and click Instance State-> Start

Click "Yes, Start"

In the following picture you can see the Instance running with newly created volume

Check the size of the volume increased from 18 GB to 22GB

Now Delete the old Volume. Select ELASTIC BLOCK STORE->Volumes. Right click the old volume and click "Delete Volume"

Click "Yes, Delete"

The old volume has been Deleted and you can see the newly created 22GB volume attached.