Monday, November 10, 2014

AWS EC2 - How to expand an Amazon EBS volume.

How to extend, grow, resize an Amazon EBS volume.

The network guys needed to extend the volume of one of their network management servers.  I've performed this function 100's of times in my VMware environment.  However, this is the first time I'm extending a volume on an EC2 instance.  I thought I'd document the steps.

1. Shutdown/Stop the instance you wish to expand or gracefully shut down the server within the OS (preferred).  I'm suprised there isn't a shutdown option available through AWS.

2. Click on the instance and select Create Snapshot and enter the snapshot details:
3.  After the snapshot has been created, create a new volume from the snapshot.
4. Enter the appropriate Type, Size and Availability Zone for the volume.

Selecting the Type - General Purpose (SSD) -creates a Volume Type of gp2.
Selecting the Type - Magnetic - creates a Volume Type of standard.
  
5. Detach the old volume from the instance after noting the Device Name of the volume being removed.

  
6.  Attach the newly created volume to the instance.  Enter the Device info noted earlier.

7.  Start the instance and confirm that the new space is available.  (I absolutely LOVE the lsblk command in linux!)

8. Expand the volume using the OS tools.

9. Delete the old volume and enter the appropriate name and details on the new volume.

1 comment:

  1. Thanks for providing this informative information you may also refer.
    http://www.s4techno.com/blog/2015/12/21/protect-instances-from-termination-by-auto-scaling/

    ReplyDelete