Block storage for databases and virtual machines explained
Block storage gives a server a disk over the network; performance and recovery options determine whether it suits databases.
Block storage is storage that a server uses like an ordinary disk, but that is provided over the network. It suits databases and virtual machines that perform fast, small reads and writes. Pay attention to IOPS, throughput, latency, snapshots and availability.
Who is it for: DevOps engineers, database administrators and technical buyers who are assessing disks for virtual machines or databases.
What is block storage?
Block storage offers a volume: a series of fixed-size blocks that a server reads from and writes to. The server formats the volume with a file system or hands it directly to a database. The storage itself does not know which files are on it.
In a cloud environment the volume is usually detached from the server. You can attach it to another virtual machine, enlarge it or take a snapshot of it. The volume therefore survives a server being replaced, which is valuable for databases.
Which performance figures matter?
Three metrics determine how fast a volume feels. IOPS is the number of reads and writes per second. Throughput is the amount of data per second. Latency is the waiting time per operation and often matters most for databases.
These values depend on the block size and queue depth of your workload. A provider often quotes a maximum; ask under which conditions that maximum is reached and whether it is shared with other customers. Then measure with a test of your own, for example with a standard benchmark tool on a volume of realistic size.
How do you protect data on a volume?
A snapshot is a point-in-time copy of a volume. It is not a replacement for a full backup if it sits in the same environment as the volume. Keep copies in another location or another management domain, and test restoring periodically.
For databases, consistency is important. A snapshot in the middle of a write can capture an unusable state. Use the database’s own backup mechanisms, or briefly put the database in a quiet state before you take the snapshot.
What else should you look out for?
Check whether the volume can run in the same zone as the server, because distance adds latency. Look at encryption at rest, the ability to enlarge online and the behaviour when the underlying hardware fails. For high availability, replication at database level is usually more robust than a single volume alone.
Criteria for block storage
| Criterion | What you check | Why it matters |
|---|---|---|
| IOPS and throughput | Committed or maximum values and the conditions | Determines capacity under load |
| Latency | Measured waiting time at your block size | Determines the speed of transactions |
| Snapshots | Frequency, location and recovery time | Determines your recovery options |
| Enlarging | Growing online without downtime | Avoids migrations as data grows |
| Zone and redundancy | Where the volume physically sits and how it is copied | Determines failure risk and latency |
Who is this less suitable for?
- Block storage is less suitable for large, rarely changed files; object storage is cheaper and more scalable for that.
- If several servers have to edit the same files at the same time, file storage or a cluster file system is a better fit.
- Small applications without high latency requirements often have enough with the virtual machine’s standard disk.
Frequently asked questions
What is the difference between local NVMe and network block storage?
Local disks sit in the host and have low latency, but often disappear when the server is replaced. Network volumes are more durable and portable, with slightly more latency.
What is iSCSI?
iSCSI is a protocol for offering block storage over an IP network. Many storage systems use it under the hood.
How do I test the performance of a volume?
Use a benchmark tool with your application's block size, mix of reads and writes and concurrency, and repeat the test at different times.
Should I encrypt database volumes?
Encryption at rest reduces risk if hardware is lost. Ask who manages the keys and what that means for your security model.
