Skip to content
hostcomplex

What Is Block Storage?

Maarten Soetens 3 min read

How Block Storage Presents a Disk

Block storage is a type of storage that presents a disk as a sequence of fixed-size blocks. The server treats it like a physical drive, formats it with a file system and reads or writes blocks by number. Block volumes are the usual way hosts offer this: a virtual disk attached to a server over the network.

A block is the smallest unit of data the storage system addresses, typically a few kilobytes. The storage system does not know which file a block belongs to; that knowledge belongs to the file system on the server. This separates block storage from file and object storage, as explained in the comparison of storage types.

Attaching, Resizing and Replicating Volumes

A block volume is attached to a server and can be detached and moved to another server. That makes it easy to replace a machine without copying the data. Most volumes attach to one server at a time.

Volumes can usually be resized. Growing the volume adds space, but the file system on it must also be extended before the server can use the extra room. Many platforms offer snapshots of volumes and replication to a second location or to other storage nodes, which protects against hardware failure. Distributed designs such as Ceph use this approach at scale.

Why Databases Rely on Block Volumes

Databases write small pieces of data at random positions and expect each write to be confirmed quickly. Block volumes provide low latency and consistent write behavior, so a database can control its own on-disk layout and flush data reliably.

Keeping the database on a separate volume also means the server itself can be rebuilt without losing data. Unlike the temporary disks on some cloud servers, a block volume persists independently of the machine it is attached to, as covered in ephemeral vs persistent storage.

Replacing a Web Server Without Losing Data

A small site stores its uploads and database on a block volume attached to one web server. The server's operating system becomes outdated, so the administrator builds a new server from a fresh image. The volume is detached from the old server and attached to the new one. The file system is mounted, and the site is back online with its data intact.

The same process has limits. The old server should be shut down cleanly before the volume is detached, or the file system may need a repair check when it is mounted again.

Frequently asked questions

Can a block volume be attached to two servers at once?

Usually not. Most block volumes attach to one server at a time, because two servers writing to the same file system without coordination will corrupt data. Sharing block storage between machines needs a cluster-aware file system or a special volume type that supports multi-attach.

Is a block volume the same as a local disk?

It behaves like one from the server's point of view, but it is not inside the machine. A local disk connects directly to the server, while a block volume is reached across a network. That makes volumes flexible and easy to move, but they usually add some latency compared with a local NVMe drive.

  • Two-Factor Authentication

    Two factor authentication hosting adds a second check to control panel, domain and CMS logins. Learn which methods are strongest and why 2FA helps.

  • What Is an A Record?

    What is an A record? Learn how this DNS record maps a hostname to an IPv4 address, why domains use several A records and the root and www pattern.

  • Billing and Automation Platforms

    What is WHMCS? Learn how this commercial billing and automation platform helps hosts sell plans, collect payments and create accounts automatically.