vmware-tanzu / velero

Backup and migrate Kubernetes applications and their persistent volumes
https://velero.io
Apache License 2.0
8.4k stars 1.37k forks source link

“No volume ID returned by volume snapshotter for persistent volume” warning is shown for NFS volumes. #7915

Closed reitermarkus closed 20 hours ago

reitermarkus commented 5 days ago

What steps did you take and what happened:

Created a backup. It completed successfully, but shows the following warning for an NFS PV:

Warnings:
  Velero:     <none>
  Cluster:   resource: /persistentvolumes name: /my-volume message: /No volume ID returned by volume snapshotter for persistent volume
  Namespaces: <none>

All pods which are using this volume also have the corresponding backup.velero.io/backup-volumes-excludes annotation.

What did you expect to happen:

No warning, since there is no NFS snapshotter and the volume is excluded from backups.

Anything else you would like to add:

Related to https://github.com/vmware-tanzu/velero/issues/7672.

Volume definition:

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: myvolume
spec:
  capacity:
    storage: 100Ti
  volumeMode: Filesystem
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  storageClassName: nfs
  mountOptions:
    - hard
    - nfsvers=4.1
  nfs:
    path: /mypath
    server: myserver

Environment:

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

ywk253100 commented 5 days ago

The annotationbackup.velero.io/backup-volumes-excludes is used for file system backup: https://velero.io/docs/v1.14/file-system-backup/#using-the-opt-out-approach

For native snapshot, please define a resource policy to skip the volume: https://velero.io/docs/v1.14/resource-filtering/#resource-policies

reitermarkus commented 20 hours ago

@ywk253100, thanks, resource policy was what I was missing.