Error “/var/lib/kubelet/pods//volumes: no such file or directory”
Summary
Some times you see this kind of error in job activity:
“Failed to copy PVC <PVC-NAME> in namespace <NAMESPACE>. Error is stat /var/lib/kubelet/pods//volumes: no such file or directory”
Details
This error comes for PVCs which are not attached to any pod and the backup method “Read data from underlying host volume” is selected. When this method is used, mover tries to read the data from a host directory that is mounted under the “pod” directory. If the PVC is not attached to a pod, there will not be a host directory for it so read fails with this error.
For this reason, unattached PVCs cannot be backed up using “Read data from underlying host volume” method. The other LIVE method “Read data from PVC” should work as does the snapshot method.
If it is not possible to change the backup method at storage class level (possibly because the method works for all
other PVCs), you can configure a different backup method just for this PVC, by setting the label
cloudcasa.io/backup-method. Possible values for this label are as follows:
- SNAPSHOT
Take snapshot of PVC and then create a temp PVC from the snapshot, to be used for backup.
- LIVE_FROM_PVC
Mount the PVC to the mover pod and read it.
- LIVE_FROM_HOST_POD_VOL
Directly read from the underlying host volume. Avoid this for unattached PVCs
- LIVE
Pick one of the above two “live” options automatically.
- SKIP
Do not backup PVC data. Note that PVC/PV resource manifests will still be backed up.