Skip to content

PVC Names Changed After Restore When Using NFS CSI Driver #1018

@aashishlodha25

Description

@aashishlodha25

When restoring a Kubernetes backup, PersistentVolumeClaims (PVCs) backed by the NFS CSI Driver should retain their original names (e.g., default-data, commonfiles, pgdata).
However, when using the NFS CSI Driver, the restored PVCs are created with new, auto-generated names, breaking application workloads that expect stable PVC names.

This behavior appears to originate from the NFS CSI Driver, not Velero. Velero restores the PVC objects with the correct original names, but the driver provisions new volumes using randomly generated PVC names instead of matching the existing ones.

What Should Happen

After a restore:

PVCs should be recreated with their original names (e.g. default-data, default-permstore, commonfiles).

The NFS server directories should continue functioning without requiring renaming or manual mapping.

Applications (Deployments, StatefulSets, Helm releases) should be able to rebind to their original PVCs without modification.

What Actually Happens

After running a restore, the NFS CSI Driver provisions PVCs with randomly generated names, such as:

velero-viya-restore-fs-j6vcn-pvc-dc8f85ba-24f3-48a2-b544-7919d0e4969b
velero-viya-restore-fs-7fzlg-pvc-f11e7fb1-5bae-4a68-a4f3-1da534e0b29e

Instead of restoring the expected original PVC names:

default-data
default-permstore
commonfiles

Why This Appears to Be an NFS CSI Driver Issue

The NFS CSI Driver is responsible for provisioning backing volumes and appears to be replacing the PVC with a new one, generating a new name instead of respecting the restored name.

This behavior does not happen with other CSI drivers (Azure Disk, EBS, GCP PD, etc.), which retain the original PVC names during restore.

Therefore, this issue seems specific to nfs.csi.k8s.io provisioning logic.

Request

Please review the provisioning logic in the NFS CSI Driver to ensure:

Restored PVCs always retain their original names.

No auto-generated PVC naming happens when a PVC object already exists.

The driver correctly binds restored PVCs to existing directories on the NFS server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions