Block storage
Block storage presents capacity as a numbered sequence of fixed-size addressable logical blocks that a host reads and writes by block address, leaving any file, directory or object semantics to software above it.
Block, file and object describe interfaces at a particular layer, not mutually exclusive kinds of hardware. Ceph, for example, offers all three interfaces while storing their data as RADOS objects. The block interface does not identify the file system or application above it [5].
Linux blk-mq queues requests between file systems or userspace and device drivers. Adjacent requests can be merged, and schedulers may reorder them; the block layer and device protocols do not guarantee request completion order [4].
A logical block is an addressing unit, not necessarily an internal allocation or accounting unit. Linux block statistics count transferred sectors in 512-byte units regardless of the device's logical or physical block size. Keep those counters separate from the sizes used by an application [7].
Relations
- related
- SAN, iSCSI, NVMe, Byte-addressable storage, Direct I/O, LVM, Key-value SSD, File storage, Object storage, Shared-disk file system, Direct-attached storage, Block device
Advantages
- Logical block addresses let higher-level software choose its own file, directory or database organization. [2, 4]
- The SCSI command model can operate over different transports, including TCP/IP through iSCSI. [3]
Limitations
- Concurrent hosts need software that coordinates shared updates; block reachability alone does not keep their file-system metadata and caches consistent. [6]
- Transport parameters impose separate limits: iSCSI's negotiated data-segment and burst lengths are not a universal file-system or application I/O size. [3]
Citations
- NVM Express Base Specification, Revision 2.4 (NVM Express, Inc.; open standard)
- RFC 7143: Internet Small Computer System Interface (iSCSI) Protocol (Consolidated), IETF, April 2014
- Linux kernel documentation: Multi-Queue Block IO Queueing Mechanism (blk-mq)
- Ceph Squid architecture: client interfaces and RADOS objects
- Red Hat Enterprise Linux 8: Overview of available file systems, local, network and shared-storage categories
- Linux kernel documentation: Block layer statistics in /sys/block/<dev>/stat
Further reading
Sources & caveats
- The Ceph example describes the Squid documentation, not a requirement that every block or object system use the same internal representation [5].