Unable to mount an Hetzner Volume
Diagnostic
Section titled “Diagnostic”Check the events
Section titled “Check the events”Kubernetes records most provisioning and mounting problems as Events:
- on the namespace
- on the PersistentVolumeClaim or the Pod:
Look at the Events section at the bottom of the output.
kubee -n namespace kubectl describe pvc <PVC-NAME>kubee -n namespace kubectl describe pod <POD-NAME>Check the controller logs
Section titled “Check the controller logs”The controller is composed of the following container:
- Csi Driver (main container)
kubectl logs \ -n kube-system -l app.kubernetes.io/name=hcloud-csi,app.kubernetes.io/component=controller \ -c hcloud-csi-driver- Resizer (sidecar)
kubectl logs \ -n kube-system -l app.kubernetes.io/name=hcloud-csi,app.kubernetes.io/component=controller \ -c csi-resizer- Attacher (sidecar)
kubectl logs \ -n kube-system -l app.kubernetes.io/name=hcloud-csi,app.kubernetes.io/component=controller \ -c csi-attacherhttps://github.com/hetznercloud/csi-driver/issues/46 https://github.com/k3s-io/k3s/issues/732#issuecomment-533896909
MountVolume.WaitForAttach failed for volume "combo-postgres-pv" :volume 106135968 has GET error forvolume attachment csi-8eec466de784837604919617e7b87cd7746d2a2e1c0d712c9d1d06025825011e:volumeattachments.storage.k8s.io "csi-8eec466de784837604919617e7b87cd7746d2a2e1c0d712c9d1d06025825011e"is forbidden:User "system:node:kube-server-01.eraldy.com" cannot get resource "volumeattachments"in API group "storage.k8s.io" at the cluster scope: no relationship found between node 'kube-server-01.eraldy.com' and this object2026-06-24T20:09:46.020271099Z E0624 20:09:46.018997 1 reflector.go:204] "Failed to watch" err="pods is forbidden: User \"system:serviceaccount:kube-system:hetzner-csi-controller\" cannot watch resource \"pods\" in API group \"\" at the cluster scope" logger="UnhandledError" reflector="k8s.io/client-go/informers/factory.go:161" type="*v1.Pod"More Info
Section titled “More Info”Known Error
Section titled “Known Error”The file /dev/disk/by-id/scsi-0HC_Volume_xxx does not exist
Section titled “The file /dev/disk/by-id/scsi-0HC_Volume_xxx does not exist”Check that the volume is not attached in the Hetzner console.
If not, the volumeattachment must be deleted if one exists.
as proposed on this comment
Steps:
- Check that there is an attachment and get the name (ie
csi-id) of thevolumeattachment
kubee kubectl get volumeattachment | grep your-pvc-name- Delete it if it exists
kubee kubectl delete volumeattachment csi-idkubee kubectl delete volumeattachment csi-0f1e84ed8e2b316a4b746d0f0xxxxExample output:
Warning: deleting cluster-scoped resources, not scoped to the provided namespacevolumeattachment.storage.k8s.io "csi-0f1e84ed8e2b316a4b746d0f0xxxx" deleted- The volume should then appear in the list of disk.
# on the nodels -la /dev/disk/by-id/scsi-0HC_Volume_xxxx -> ../../sdbscsi-0HC_Volume_xxxx -> ../../sdc