- EBS volumes are placed in specific AZ and automatically replicated to protect from component failure.
- EBS Volume Types:
- General Purpose SSD (GP2)
- General purpose, balances both price and performance
- Ratio of 3 IOPS per GB with upto 10,000 IOPS and the ability for burst upto 3000 IOPS for extended period of time for volumes at 3334 GB and above.
- Good for less than 10,000 IOPS
- Provisioned IOPS SSD (IO1)
- Designed for I/O intensive operations such as large relational databases or NoSQL databases.
- Use if more than 10,000 IOPS is required.
- Can provision upto 20,000 IOPS per volume.
- Throughput Optimised HDD (ST1)
- Big data
- Data warehouse
- Log processing
- Can not be boot volume
- Magnetic Standard
- Lowest cost per GB
- Bootable
- Suitable where data is accessed infrequently and lowest storage cost is required.
- On an EBS backed volume, the default action is to delete the volume on instance termination.
- EBS backed volumes are persistent, they only exist for the life of EC2 instance.
- Instance store backed volumes are non-persistent
- EBS backed volumes can be detached and reattached to another EC2 instance.
- EBS volumes can be stopped and data will persist.
- Instance store volumes can not be stopped, however you can reboot the instance.
Volumes & Snapshots
- Volumes exist on EBS
- Volumes are simply Virtual Hard Disks.
- Snapshots are stored in S3
- They are not visible in any bucket.
- Snapshots are point in time copies of volumes.
- Snapshots are incremental
- You should stop the instance before taking snapshot of Root volume, to get proper snapshot. However, its possible to take snapshot in running instance also.
- AMIs can be created from EBS backed instances and snapshots.
- EBS volumes can be changed on the fly, including size and storage type.
- Volume will always be in the same AZ as the EC2 instance.
- To move an EC2 volume from one AZ/Region to another, take a snapshot or image of it and then copy it to another AZ/Region.
- Snapshots of encrypted volumes are encrypted automatically.
- Volumes restored from encrypted volumes are encrypted automatically.
- You can only share unencrypted snapshots.
- To create an encrypted Root volume.
- Launch an EC2 instance, by default Root volume is not encrypted.
- Take a snapshot of Root volume
- Copy snapshot and select encrypted checkbox.
- Create an AMI from copied-encrypted snapshot.
- Launch a new EC2 instance from AMI, this will show root device as encrypted.
RAID Arrays
- Redundant Array Of Independent Disks
- Types
- RAID 0 - Striped, No Redundancy, Good Performance
- RAID 1 - Mirrored, Redundancy
- RAID 5 - Good for reads, Bad for writes, AWS does not recommend ever putting RAID5 on EBS
- RAID 10 - Striped & Mirrored, Good Redundancy, Good Performance
- Use RAID to get more IOPS than a single volume can offer like for heavy load database that is not offered by RDS and needs to be installed on EC2.
- Getting a snapshot of RAID
- Taking a snapshot excludes data held in cache by application and OS. This becomes important in RAID arrays due to interdependency of volumes.
- Stop the application from writing to disk and flush all caches
- How?
- Freeze the file system.
- Unmount the RAID array.
- Shutdown the associated EC2 instance.
0 comments:
Post a Comment