Skip to content

Storage ​

Storage classes ​

ClassAccess modeDescription
hcloud-volumesReadWriteOnceBlock storage, the cluster default, supports volume expansion
nfs-rwxReadWriteManyNFS, for when several pods need to write at the same time

hcloud-volumes is the default class: a PVC without storageClassName lands there.

The RWX class is named nfs-rwx

Not nfs. A PVC with storageClassName: nfs stays Pending.

yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: data
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: hcloud-volumes
  resources:
    requests:
      storage: 10Gi

Billing ​

On hcloud-volumes there is a billing minimum of 10 GiB per volume. Smaller PVCs still provision normally but are billed at 10 GiB, so five 2 GiB volumes cost the same as five 10 GiB ones. The floor comes from the block storage itself, not from us.

nfs-rwx has no minimum. It is billed at the size you request, so a 1 GiB shared volume is billed as 1 GiB.

For uploads, media and anything else that does not need a filesystem, object storage is usually cheaper than a volume and is not tied to a single namespace.

Autoresize ​

Volumes can grow automatically, controlled by three annotations on the PVC:

AnnotationMeaning
resize.topolvm.io/thresholdHow little free space triggers an expansion
resize.topolvm.io/increaseHow much to add per step
resize.topolvm.io/storage_limitUpper bound for expansion
yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: data
  annotations:
    resize.topolvm.io/threshold: "20%"
    resize.topolvm.io/increase: "10Gi"
    resize.topolvm.io/storage_limit: "100Gi"
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: hcloud-volumes
  resources:
    requests:
      storage: 10Gi

threshold is free space, not used space

"20%" means: expand once less than 20% is free, that is at 80% full. This is the opposite of what most people assume.

Set it to "80%" and the volume expands at 20% full. It then keeps growing step by step up to storage_limit without ever having been close to full, and you pay for that space the whole time.

Where it works ​

  • On hcloud-volumes. Autoresize does not work on nfs-rwx.
  • On CloudNativePG and MariaDB volumes as well.

Volumes only grow ​

A volume can be expanded but never shrunk. That applies to autoresize and to a manually raised resources.requests.storage alike. To get smaller, create a new PVC, copy the data, and delete the old one.

Platform backups ​

Your namespace is backed up daily, including the contents of persistent volumes. Daily backups are kept for 30 days. On a paid plan a weekly backup is also kept for 12 weeks and a monthly one for 6 months; the free tier gets the daily backups only. Backups are stored at a second location in the EU.

To restore from one, open a request through the portal and support will carry it out, for the whole namespace or for individual volumes. There is no self-service restore button: restores are handled for you rather than run by you.

This does not replace your own backups

A daily namespace backup is a floor, not a strategy. It will not give you a database consistent to the second, and it will not help with data your application corrupted rather than lost. Keep application-level backups of anything you cannot rebuild, see Databases.

What's next ​