This lab walks you through the steps to launch an EC2 instance and resize an Amazon EBS Volume instance
Duration: 45 minutes
AWS Region: US East (N. Virginia) us-east-1
What is an 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
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.
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)
In this lab, we are going to launch an EC2 instance and then resize an EBS volume
Launch an EC2 instance with 8 GB of root volume
Locate the Volume that is associated with the EC2 instance we are going to resize
Resize the volume manually with the GBs which we need to increase
SSH into the EC2 instance where the EBS volume is associated
Extend the partition for the newly-expanded volume
Extend the file system for the new partition