Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 2.75 KB

04.03-ebs_volumes_snapshots.md

File metadata and controls

48 lines (33 loc) · 2.75 KB

Amazon Elastic Block Store (Amazon EBS)

https://github.com/awsdocs/amazon-ec2-user-guide/blob/master/doc_source/AmazonEBS.md

Amazon Elastic Block Store (Amazon EBS) provides block level storage volumes for use with EC2 instances. EBS volumes are highly available and reliable storage volumes that can be attached to any running instance that is in the same Availability Zone. EBS volumes that are attached to an EC2 instance are exposed as storage volumes that persist independently from the life of the instance. With Amazon EBS, you pay only for what you use. For more information about Amazon EBS pricing, see the Projecting Costs section of the Amazon Elastic Block Store page.

Amazon EBS is recommended when data must be quickly accessible and requires long-term persistence. EBS volumes are particularly well-suited for use as the primary storage for file systems, databases, or for any applications that require fine granular updates and access to raw, unformatted, block-level storage. Amazon EBS is well suited to both database-style applications that rely on random reads and writes, and to throughput-intensive applications that perform long, continuous reads and writes.

  • Volumes exists on EBS --> Virtual Hard Disk
  • Snapshots exist in S3 (saved into there).
  • Snapshots are point in time copies of Volumes.
  • Snapshots are incremental - this means that only the blocks that have changed since your last snapshot are moved to S3.
  • If this is your 1st snapshot, it may take some time to create.

Snapshot of Root Device Volumes

  • If you want to create a snapshot for EBS volume that serve as root device, you should stop the instance before.
  • However you can take a snap while the instance is running.
  • You can create AMI's from EBS-backed Instances and Snapshots.
  • You can change EBS volume sizes on the fly, including changing the size and storage type.
  • Volumes will ALWAYS be in the same AZ as the EC istance.
  • To move an EC2 volume from one AZ/Region to another, take a snap or image of it, then copy it to the new AZ/region.

Volumes vs Snapshots - Security

  • Snapshots(Volumes) of encrypted snapshots(volumes) are encrypted automatically.
  • You can share snapshots, but only if they are unencrypted. These snapshots can be shared with other AWS accounts or made public.

RAID = Redundant Array of Independent Disks

  • 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 RAID 5's on EBS
  • RAID 10 - Striped & Mirrored

How can I take a snapshot of a RAID Array?

  • Stop the applicaiton from writing to disk.
  • Flush all caches to the disk.

How can we do this?

  • Freeze the file system
  • Unmount the RAID Array
  • Shutting down the associated EC2 instance