Block Storage
What Is Block Storage?
Block storage is a storage method in which data is divided into individually addressable blocks. Each block has an address on the storage device. But the storage system does not determine whether its contents represent part of a file, a database record, or another data structure. That interpretation belongs to the operating system or application using the storage.
How Does Block Storage Work?
Block storage is accessed through read and write operations to specific locations on a storage device. When an application writes data to a file the file system learns the location of the contents of the file and converts the operation into requests to specific blocks on the storage device. When a file is read the data is retrieved from these blocks when they are read. The application doesn’t deal with the physical location of each block, it deals with the file system and the storage system, which manages the location of blocks.
Key Characteristics of Block Storage
- Addressable data units: Each block has an address by which its contents can be found.
- Block read and write operations independently: Requests operate on individual blocks and do not need to read or write the whole file.
- External data structures: how files are organized using the blocks. File system / type of application (eg a database) will dictate organization of blocks.
- Block device interface: The OS interfaces with storage using standard block read and write operations.
Benefits of Block Storage
- Efficient random access: Applications go directly to a particular storage location, making this ideal for workloads that regularly write to various parts of a dataset.
- Compatibility of database workload: data pages, indexes, and transaction logs of database engines are stored in block storage, as they are read and written to frequently.
- Ability to dictate data layout: Applications that control their own storage mechanisms are not limited to a file-based or object-based structure dictated by the storage service.
- OS compatibility: can be used with common file systems, so ideal for system disks and application volumes.
Block Storage in Cloud Computing
Cloud providers offer block storage as virtual volumes attached to cloud servers. Although the volume appears to the operating system as a disk, its physical storage resides within the provider’s infrastructure and is accessed through the provider’s storage system. This separates the server’s storage from the physical drives installed in its host machine.
The cloud volume is frequently used as the system disk of a virtual machine, or as a database storage. The cloud volume will have a performance driven by the I/O capabilities, latency throughput and storage architecture of the service. Additional capabilities such as volume snapshots or copies are available with providers and perform slightly differently with each service.