Cloud Computing Dictionary

What is Block Storage?

Block storage is a cloud storage service that provides raw storage volumes that can be attached to compute instances like virtual machines, offering high performance for databases and applications.

Block storage is a cloud storage service that provides raw storage volumes that can be attached to virtual machines and servers. Unlike object storage (Amazon S3) or file storage (NFS), block storage presents storage as raw disk volumes that applications can format and use just like physical hard drives. It's the storage backbone of modern cloud infrastructure, powering databases, applications, and virtual machine file systems.

What is Block Storage?

Block storage divides data into fixed-size blocks (typically 512 bytes to 4 KB) and manages them as discrete units. An application or operating system treats block storage as if it were a directly attached physical disk, with complete control over how the storage is organized and used.

Key Characteristics:

  • Raw storage volumes without file system abstraction
  • Direct attachment to compute instances
  • Low-level access (can format as any file system)
  • High performance and low latency
  • Persistent data across instance restarts
  • Independent scaling (storage independent from compute)

Block storage is the most common storage type in cloud computing because it provides the flexibility and performance needed for virtually any application.

Block Storage vs. Other Storage Types

Block Storage:

  • Raw storage volumes
  • Used like physical disks
  • Direct attachment required
  • High performance, low latency
  • Manageable file systems (ext4, NTFS, etc.)
  • Good for: Databases, applications, OS files
  • Example: AWS EBS, Azure Managed Disks

Object Storage:

  • Stores objects (files) with metadata
  • Access via HTTP/HTTPS API
  • No direct attachment; requires application code
  • Eventual consistency
  • Scalable to massive datasets
  • Good for: Backups, archives, media files, data lakes
  • Example: Amazon S3, Azure Blob Storage

File Storage:

  • Hierarchical file system with directories
  • Network access (NFS, SMB, etc.)
  • Multiple systems can share simultaneously
  • Lower performance than block storage
  • Good for: Team file shares, content repositories
  • Example: AWS EFS, Azure Files

Use the Right Type:

  • Block Storage - When you need OS file system or application raw storage
  • Object Storage - When you need massive scalability and HTTP API
  • File Storage - When you need multi-user network access to shared files

How Block Storage Works

Block storage operates at a lower level than file systems:

Logical Volume Creation - System administrator creates storage volumes:

  • Specify size (10 GB, 1 TB, etc.)
  • Define performance characteristics (SSD, HDD, provisioned IOPS)
  • Set redundancy options (replication, snapshots)

Attachment to Instance - Volume is attached to a virtual machine:

  • Volume appears as a raw device (/dev/sdb in Linux)
  • Operating system sees it as unformatted storage

Formatting and File System - User creates a file system:

  • Choose file system type (ext4, XFS, NTFS, etc.)
  • Format the volume (mkfs.ext4 /dev/sdb)
  • Mount to a directory (mount /dev/sdb /data)

Read/Write Operations - Applications read and write through the OS:

  • Application requests data from /data/file.txt
  • OS translates to block operations
  • Block storage system retrieves blocks
  • Data returned to application

Data Persistence - Data persists independently:

  • Remains even if VM is shut down
  • Can be detached and reattached to different VMs
  • Can be snapshotted for backup
  • Can be replicated for redundancy

Types of Block Storage

SSD Block Storage (Solid State Drives):

  • High performance (thousands of IOPS)
  • Low latency (milliseconds)
  • Higher cost per GB
  • Use for: Databases, high-performance applications

HDD Block Storage (Hard Disk Drives):

  • Lower performance (hundreds of IOPS)
  • Higher latency (tens of milliseconds)
  • Lower cost per GB
  • Use for: Archive, sequential workloads, backups

Provisioned IOPS:

  • Guaranteed performance levels
  • Pay for provisioned throughput
  • Consistent performance (good for databases)

Burst-Capable Storage:

  • Baseline performance with ability to burst higher
  • Cost-effective for variable workloads
  • Good for: Web servers, application servers

Block Storage Performance Characteristics

IOPS (Input/Output Operations Per Second)

  • Measures how many operations happen per second
  • SSD: 3,000-20,000+ IOPS
  • HDD: 100-300 IOPS
  • Critical for database performance

Throughput (Bandwidth)

  • Measures data transfer rate (MB/s)
  • SSD: 200-500+ MB/s
  • HDD: 100-150 MB/s
  • Critical for sequential access (streaming)

Latency

  • Time for single operation to complete
  • SSD: 1-3ms typical
  • HDD: 10-20ms typical
  • Critical for interactive applications

Consistency

  • Data written is immediately available for read
  • Durability guaranteed (data survives failures)
  • Important for transactional systems

Real-World Block Storage Use Cases

Database Systems - Most demanding use case:

  • MySQL, PostgreSQL databases
  • Oracle, SQL Server
  • NoSQL databases (MongoDB, Cassandra)
  • Require high IOPS and low latency
  • Typically use SSD block storage

Web Application Servers:

  • Store application files
  • Cache temporary data
  • Session storage
  • Medium performance requirements

Content Management Systems:

  • Store media files and documents
  • Database backend uses block storage
  • File serving uses block storage

Virtual Machine Boot Volumes:

  • Where operating system is installed
  • Every VM requires root block storage
  • Persists across VM restarts

Data Processing and Analytics:

  • Data warehouses (Redshift, BigQuery)
  • Spark clusters
  • Data lake staging areas
  • Variable performance needs

Backups and Snapshots:

  • Point-in-time backups of entire volumes
  • Disaster recovery
  • Testing with production data

Block Storage Snapshots and Backups

Snapshots - Point-in-time copies:

  • Capture entire volume state at a moment
  • Incremental (only changes stored)
  • Quick to create (seconds to minutes)
  • Can restore or clone volumes

Cloning - Create new volumes from snapshots:

  • Independent copy of data
  • Can attach to different instances
  • Used for disaster recovery, testing, scaling

Replication - Geographic redundancy:

  • Synchronous: Write confirms when replicated (slow)
  • Asynchronous: Write confirms immediately (faster, slight data loss risk)
  • Multi-region protection

Cost Considerations

Storage Cost - Per GB per month:

  • SSD: $0.10-0.15/GB in US regions
  • HDD: $0.05-0.08/GB in US regions
  • Price varies by region and cloud provider

Provisioned IOPS Cost - Performance premium:

  • Guaranteed performance costs extra
  • Example: 1,000 provisioned IOPS = ~$0.065/month
  • Necessary for predictable high-performance needs

Snapshot Storage - Backup cost:

  • Snapshots consume storage
  • Cheaper than keeping multiple volumes (incremental)
  • Automatic snapshot schedules can accumulate cost

Data Transfer Cost - Moving data in/out:

  • Egress (outbound) typically costs more
  • Large data transfers can add up
  • Internal cloud transfers often free

Optimization Tips:

  • Right-size volumes (don't over-provision)
  • Delete unused snapshots
  • Use appropriate storage type (HDD for backups)
  • Consolidate volumes when possible
  • Use automated lifecycle policies

Block Storage Best Practices

Performance:

  • Use SSD for databases and high-IOPS workloads
  • Monitor IOPS and throughput utilization
  • Provision enough IOPS to avoid throttling
  • Use SSDs for database logs (critical performance)

Reliability:

  • Create regular snapshots for backup
  • Enable replication for critical data
  • Test disaster recovery procedures
  • Monitor storage health and errors

Security:

  • Enable encryption at rest
  • Encrypt sensitive data before writing
  • Control access to snapshots
  • Audit access to storage volumes

Cost:

  • Delete unused volumes and snapshots
  • Use appropriate storage type
  • Monitor growing storage costs
  • Right-size based on actual usage

Capacity Planning:

  • Monitor utilization trends
  • Allocate buffer for growth
  • Delete old snapshots regularly
  • Plan for peak usage periods

When to Use Block Storage

Use Block Storage when:

  • Running applications on virtual machines
  • Database systems require raw storage access
  • Need high performance and low latency
  • Data must persist across instance restarts
  • Need direct control over file system

Don't Use Block Storage when:

  • Storing massive amounts of unstructured data (use object storage)
  • Multiple systems need concurrent access (use file storage)
  • Just need simple backups (consider object storage)
  • Performance requirements are low (use cheaper object storage)

Getting Started with Block Storage

1. Provision a Volume:

  • Choose cloud provider (AWS, Azure, Google Cloud, etc.)
  • Create volume with desired size and type
  • Select availability zone/region

2. Attach to Instance:

  • Create or select a virtual machine
  • Attach the volume
  • Volume appears as a device

3. Format and Mount:

  • SSH/RDP into the instance
  • Format the volume (mkfs.ext4 /dev/sdb)
  • Create mount point (mkdir /data)
  • Mount volume (mount /dev/sdb /data)
  • Update /etc/fstab for persistence

4. Configure and Use:

  • Set up file systems as needed
  • Create databases
  • Deploy applications
  • Monitor performance

5. Manage and Backup:

  • Create regular snapshots
  • Monitor disk usage
  • Resize if needed
  • Delete snapshots when no longer needed

Frequently Asked Questions

Can I attach one block storage volume to multiple VMs? Most cloud providers don't support this directly. Instead, use file storage (NFS) or object storage if multi-access is needed. Some support read-only sharing through snapshots.

What happens if my block storage fails? Cloud providers replicate block storage across physical devices. Failure of one device doesn't cause data loss. Snapshots provide additional protection.

Can I resize block storage volumes? Yes. Most modern cloud platforms allow expanding volumes without downtime. Reducing size is more complex and usually requires creating new smaller volume and migrating data.

Is block storage encrypted? Most cloud providers support encryption at rest (default in some regions). Encryption in transit depends on application. Always verify encryption status for sensitive data.

How do I migrate block storage between regions? Create a snapshot, copy snapshot to target region, create new volume from snapshot in target region. Alternatively, use data transfer services provided by cloud providers.

What file system should I use? Linux: ext4 (standard), XFS (large files). Windows: NTFS. Mac: APFS. Choose based on OS and requirements. ext4 is most compatible.