Resizing Amazon EBS Volume

Lab Details

  1. This lab walks you through the steps to launch an EC2 instance and resize an Amazon EBS Volume instance

  2. Duration: 45 minutes

  3. AWS Region: US East (N. Virginia) us-east-1

Introduction

What is an Amazon EBS Volume?

Amazon EBS Volume

  • Elastic Block Store volume is a block level storage device that can be associated with an EC2 instance

  • EBS Volumes can be used as both primary storage and secondary storage

  • The primary EBS volume acts as root volume and should be created and attached to the instance at the time of instance launch. Storage  can be increased in the future if needed. This primary EBS volume cannot be detached from the instance.

  • The secondary volume can be attached, detached and modified at any time.

  • An instance can have one primary EBS volume and n number of secondary volumes

  • One EBS Volume can be only associated with one instance

  • There are 5 types of EBS volumes:

    • General Purpose SSD (gp2)- Provides balance of both price and performance and is generally chosen by default

    • Provisioned IOPS SSD (io1)-- Most expensive of the volume types with highest performance and well-suited for tasks with heavy workloads

    • Throughput Optimized HDD (st1)- A low-cost volume that focuses on optimizing throughput and is generally used for large sequential workloads dealing with big data warehouses. These volumes cannot be used as root volumes for EC2 instances.

    • Cold HDD (sc1)- least expensive of the volume types and specifically designed for workloads which are accessed less frequently. These volumes also cannot be used as root volumes for EC2 instances.

    • Magnetic (Standard) Previous generation magnetic volumes which cannot be used as root volumes for EC2 instances

Resizing EBS Volumes

  • In this digital world of ever enlarging data it’s not enough to build solutions with hard-coded amount of storage that cannot scale.

  • If the volume associated with the EC2 instance fills up, we have to increase the side of the volume.

Advantages of using EBS Volumes

  • High availability and flexibility

  • Data can be kept persistently on a file system even after shut downing the instance

  • Enables snapshots, which capture the data stored at a point in time and can be restored at any time.

  • The snapshots enables us to create a volume and attach it to another instance if needed.

  • Can be resized at any time as and when required

  • Comes equipped with encryption (and encryption-at-rest).

  • EBS Volumes can be attached, detached and associated with other instances at any point in time (exception the primary volume)

Architecture Diagram

 

  Lab Tasks

  1. In this lab, we are going to launch an EC2 instance and then resize an EBS volume 

  2. Launch an EC2 instance with 8 GB of root volume

  3. Locate the Volume that is associated with the EC2 instance we are going to resize

  4. Resize the volume manually with the GBs which we need to increase

  5. SSH into the EC2 instance where the EBS volume is associated

  6. Extend the partition for the newly-expanded volume

  7. Extend the file system for the new partition



Join Whizlabs_Hands-On to Read the Rest of this Lab..and More!

Step 1 : Login to My-Account
Step 2 : Click on "Access Now" to view the course you have purchased
Step 3 : You will be taken to our Learn Management Solution (LMS) to access your Labs,Quiz and Video courses