Understanding Hetzner Volume Storage: A Beginner’s Guide

Introduction

When you need scalable, high‑performance storage for your Hetzner cloud servers, Hetzner Volume Storage is the go‑to solution. In this guide we’ll break down what volumes are, how they differ from local disks, and how to deploy and manage them efficiently.

What Is Hetzner Volume Storage?

Hetzner Volume Storage provides block‑level storage that you can attach to any cloud server in the same data centre. Think of it as an external hard drive that can be detached, resized, and re‑attached to another instance without data loss.

Key Benefits

  • Flexibility: Attach, detach, or move volumes across servers instantly.
  • Scalability: Start with 10 GB and scale up to several TB as your needs grow.
  • Performance: SSD‑backed volumes deliver low latency and consistent IOPS.
  • Reliability: Volumes are replicated within the same rack, protecting against single‑node failures.

When to Use Volumes vs. Local Disks

Local disks are fast but tied to the server’s lifecycle. Volumes shine in these scenarios:

  1. Data persistence after server termination.
  2. Need to share the same data across multiple servers (e.g., a web farm).
  3. Planned migrations or scaling events.

How to Create a Volume

Follow these steps in the Hetzner Cloud Console or via the CLI:

Console Method

  1. Navigate to VolumesCreate Volume.
  2. Select the data centre, size, and optional name.
  3. Click Create. The volume appears in the list within seconds.

CLI Method

hcloud volume create --name=mydata --size=100 --location=fsn1

Replace mydata, 100, and fsn1 with your preferred values.

Attaching a Volume to a Server

Once the volume exists, attach it to a server in the same location:

hcloud server attach-volume SERVER_ID VOLUME_ID

After attachment, you’ll need to format and mount the volume inside the OS.

Linux Example

# List new block device lsblk # Create a filesystem (ext4 as example) sudo mkfs.ext4 /dev/sdb # Create mount point sudo mkdir /mnt/volume # Mount the volume sudo mount /dev/sdb /mnt/volume # Persist across reboots echo '/dev/sdb /mnt/volume ext4 defaults 0 2' | sudo tee -a /etc/fstab

Resizing a Volume

Need more space? Hetzner lets you expand a volume without data loss:

  1. Increase size in the console or with hcloud volume resize VOLUME_ID --size NEW_SIZE.
  2. On the server, run sudo resize2fs /dev/sdb (or the appropriate tool for your filesystem).

The operation is online; you don’t have to detach the volume.

Backup and Snapshots

While Hetzner volumes are replicated, you may still want point‑in‑time backups. Use the built‑in snapshot feature:

hcloud volume snapshot create VOLUME_ID --description "Weekly backup"

Snapshots can be restored to a new volume, providing an easy disaster‑recovery path.

Best Practices

  • Keep OS and data on separate volumes: Allows independent resizing and backups.
  • Use descriptive names: Helps identify purpose (e.g., db-data, logs).
  • Monitor IOPS: Align volume size with workload; larger volumes often get higher IOPS limits.
  • Secure data: Encrypt volumes at the file system level if you store sensitive information.

FAQ

Can I attach a volume to multiple servers simultaneously?

No. Hetzner volumes are exclusive to a single server at a time. For shared storage, consider a network file system (NFS) or a dedicated database cluster.

What happens to a volume when I delete the server?

The volume remains untouched. You can re‑attach it to another server or delete it manually.

Is there a performance difference between SSD and HDD volumes?

All Hetzner block storage is SSD‑backed, delivering consistent low latency. HDD options are not currently offered.

How many volumes can I create per project?

Hetzner currently allows up to 250 volumes per project, subject to quota adjustments upon request.

Do snapshots affect performance?

Creating a snapshot is an asynchronous operation and has minimal impact on I/O. Restoring from a snapshot requires provisioning a new volume.

Conclusion

Hetzner Volume Storage gives you flexible, scalable, and reliable block storage that grows with your projects. By mastering creation, attachment, resizing, and backup workflows, you can keep your applications performant and your data safe.

Ready to Upgrade Your Storage?

Start a free Hetzner trial today, spin up a cloud server, and attach a volume in minutes. Need help? Contact our support team for a personalized setup walkthrough.

Comments are closed, but trackbacks and pingbacks are open.