Resize the disk volume of a Linux EC2 Virtual machine

0
1171
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.

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.

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.

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.

to attach.

 Resize the disk volume of a Linux EC2 Virtual machine

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

Click « Yes, Detach »

 Resize the disk volume of a Linux EC2 Virtual machine

Right click the newly created volume from Snapshot and click « Attach Volume »

Select the Instance where we want to attach the volume

 Resize the disk volume of a Linux EC2 Virtual machine

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 »

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

 Resize the disk volume of a Linux EC2 Virtual machine

Click « Yes, Delete »

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