Chapter 8. Storing your data on hard drives: EBS and instance store
This chapter covers
- Attaching network storage to your EC2 instance
- Using the instance store of your EC2 instance
- Backing up your block-level storage
- Testing and tweaking the performance of your block-level storage
- Instance storage versus network-attached storage
Block-level storage with a disk file system (FAT32, NTFS, ext3, ext4, XFS, and so on) can be used to store files as you do on a personal computer. A block is a sequence of bytes and the smallest addressable unit. The OS is the intermediary between the application that wants to access files and the underlying file system and block-level storage. The disk file system manages where (at what block address) your files are persisted on the underlying block-level storage. You can use block-level storage only in combination with an EC2 instance where the OS runs.
The OS provides access to block-level storage via open, write, and read system calls. The simplified flow of a read request goes like this:
1. An application wants to read the file /path/to/file.txt and makes a read system call.
2. The OS forwards the read request to the file system.
3. The file system translates /path/to/file.txt to the block on the disk where the data is stored.