diff --git a/internal/rbd/clone.go b/internal/rbd/clone.go index 712a57c2f..41efa2584 100644 --- a/internal/rbd/clone.go +++ b/internal/rbd/clone.go @@ -21,6 +21,7 @@ import ( "errors" "fmt" + "github.com/ceph/ceph-csi/internal/util/k8s" "github.com/ceph/ceph-csi/internal/util/log" librbd "github.com/ceph/go-ceph/rbd" @@ -206,6 +207,13 @@ func (rv *rbdVolume) doSnapClone(ctx context.Context, parentVol *rbdVolume) erro } }() + err = tempClone.unsetAllMetadata(k8s.GetVolumeMetadataKeys()) + if err != nil { + log.ErrorLog(ctx, "failed to unset volume metadata on temp clone image %q: %v", tempClone, err) + + return err + } + // create snap of temp clone from temporary cloned image // create final clone // delete snap of temp clone