Today we will be looking into Hetzner’s Cloud Storage Volumes and how you can resize volumes on the fly!
What is Hetzner’s Cloud Storage Volumes
Hetzner Cloud offers a fast, flexible, and cost-effective SSD based Block Storage which can be attach to your Hetzner Cloud Server. At this point in time its available in the Nuremberg and Helsinki regions.
Resizing of Volumes
Volumes can be resized up to 10TB and the console allows you to resize in 1GB increments. You are allowed to increase, but cannot decrease.
Demo through Cloud Volumes
Let’s run through a demo, where we will do the following:
- Provision a Server
- Provision a Volume (XFS Filesystem / EXT4 is also optional)
- Inspect the Volume, do some performance testing
- Resize the Volume via Hetzner Cloud Console
- Grow the XFS Filesystem
After provisioning a server, which takes less than a minute, you should see that the server is created:
SSH into your server. At this moment, we have not provisioned any volumes, so only the root partition should be mounted. Look at the block allocation:
1 2 3 4 5 |
|
Have a look at the fstab:
1 2 3 4 |
|
And have a look at the mounted disks layout:
1 2 3 4 5 6 7 8 9 |
|
Now, time to provision a Volume. Head over to the Volumes section:
I’m going ahead with creating a volume with 10GB of space and assign it to my server, and yeah that’s right, 10GB of storage is 0,40 EUR per month, epic value for money!
After you volume is created, you should see similar output below:
Head back to your server, and have a look at the output when running the similar commands from earlier:
1 2 3 4 5 6 |
|
The fstab config:
1 2 3 4 5 |
|
The disk layout:
1 2 3 4 5 6 7 8 9 10 |
|
We can see from the output above how easy it is to provision a volume to your Hetzner Cloud Server. And everything gets done for you, the disk is mounted and the /etc/fstab
configuration is populated for you.
Time for some performance testing on the volume:
1 2 3 4 |
|
Pretty neat right? :D
Let’s resize the volume via the Hetzner Cloud Console to 20GB and resize the filesystem. From the Console, head over to the volumes section, select the more options and select resize:
After the volume has been resized, head back to your server and resize the filesystem. As we are using XFS Filesystem, we will use xfs_growfs
:
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Have a look at the disk layout and see that the filesystem was resized on the fly. If you have applications writing/reading to and from that volume, its better to unmount it first.
1 2 3 4 5 6 7 8 9 10 |
|
I must admit, I am really stoked with Hetzner’s offerings and their performance. I’ve been hosting servers with them for the past 5 months and so far they really impressed me.
Have a look at Hetzner Cloud’s offerings, they have great prices as you can start off with a server from as little as 2.49 EUR per month, which gives you 1vCPU, 2GB of RAM, 20GB disk Space and 20TB of traffic. I mean, thats awesome value for money. They also offer Floating IP’s, Backups, etc.
Resources:
Thank You
Please feel free to show support by, sharing this post, making a donation, subscribing or reach out to me if you want me to demo and write up on any specific tech topic.
Ad space:
Thanks for reading!