Skip to content

Commit 8c77f87

Browse files
committed
OADP-4360 added troubleshooting info for PVR fail
1 parent d982ca9 commit 8c77f87

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

backup_and_restore/application_backup_and_restore/troubleshooting.adoc

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,45 @@ requests:
5555
----
5656
====
5757

58+
[id="podvolumerestore-fails_{context}"]
59+
== PodVolumeRestore fails to complete when StorageClass is NFS
60+
61+
The restore operation fails when there is more than one volume during a NFS restore by using `Restic` or `Kopia`. `PodVolumeRestore` either fails with the following error or keeps trying to restore before finally failing.
62+
63+
.Error message
64+
65+
[source,terminal]
66+
----
67+
Velero: pod volume restore failed: data path restore failed: \
68+
Failed to run kopia restore: Failed to copy snapshot data to the target: \
69+
restore error: copy file: error creating file: \
70+
open /host_pods/b4d...6/volumes/kubernetes.io~nfs/pvc-53...4e5/userdata/base/13493/2681: \
71+
no such file or directory
72+
----
73+
74+
.Cause
75+
76+
The NFS mount path is not unique for the two volumes to restore. As a result, the `velero` lock files use the same file on the NFS server during the restore, causing the `PodVolumeRestore` to fail.
77+
78+
.Solution
79+
80+
You can resolve this issue by setting up a unique `pathPattern` for each volume, while defining the `StorageClass` for `nfs-subdir-external-provisioner` in the `deploy/class.yaml` file. Use the following `nfs-subdir-external-provisioner` `StorageClass` example:
81+
82+
83+
[source,yaml]
84+
----
85+
apiVersion: storage.k8s.io/v1
86+
kind: StorageClass
87+
metadata:
88+
name: nfs-client
89+
provisioner: k8s-sigs.io/nfs-subdir-external-provisioner
90+
parameters:
91+
pathPattern: "${.PVC.namespace}/${.PVC.annotations.nfs.io/storage-path}" # <1>
92+
onDelete: delete
93+
----
94+
95+
<1> Specifies a template for creating a directory path by using `PVC` metadata such as labels, annotations, name, or namespace. To specify metadata, use `${.PVC.<metadata>}`. For example, to name a folder: `<pvc-namespace>-<pvc-name>`, use `${.PVC.namespace}-${.PVC.name}` as `pathPattern`.
96+
5897
[id="issues-with-velero-and-admission-workbooks"]
5998
== Issues with Velero and admission webhooks
6099

0 commit comments

Comments
 (0)