Disk Storage (Block Storages)
Activity: 1
- Create a windows ec2 instance (30 GB) with one additional ebs volume (1 GB)
- Ensure you have c drive and d-drive
- c-drive => os disk (ebs volume with os)
- d-drive => additional ebs volume


- Now format the disk at create a logical drive
D:


- Now resize the disk to 2 GiB



- Now how to use unallocated storage is left to the user. We can extend the volume (resize D to 2 GB) or create a new volume like E drive
-
In the class we have extended the D drive
-
Note:
- We cannot decrease the volume size
- We can change the type of the volume with or without increasing the volume size
Exercise:
- Learn how to create filesystem in linux using xfs or ext4
- useful commands:
- lsblk
- df -h
- mkfs
- mount
- fstab
Backups of Disk => EBS Snapshots
- How snapshots work in AWS

- Deleting latest snapshot (i.e. Day 3) the data will be lost when we create a new ebs disk from snapshot as the
green color data i.e. changes during day 3are deleted

- Now considering we have all the snapshots

- What would happen if we delete older snapshots
- Day 2 snapshot deleted

- Day 3 snapshot deleted

- Amazon Machine Image (AMI) is needed to Create EC2 instance & AMI is EBS snapshot + metadata.
- In AWS ebs volumes are available in Availability Zones and snapshots belong to region.
- Overview

- To create a disk with same contents in different zone:
- Create snapshot and using snapshot create an ebs volume in any zone of same region
- To create an ec2 with same contents in different zone
- Create AMI (snapshot + Metadata) and using AMI create an ec2 instance
- To create disk in other region
- Create snapshot
- copy snapshot to other region and create ebs volume
- To create ec2 in other region
- Create AMI
- Copy AMI to other region
- Create ec2 using AMI
- Note:
- Snaphshop/AMI copied from one region to other will not have same id.
Terms
- Full Backup
- Incremental Backup
- Restore from Backup
- Point in time restore
