Skip to content

PVC cloning without data #365

@cloudcafetech

Description

@cloudcafetech

Trying to do PVC cloning but without data

  • Clone yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: ubuntu-pvc-clone
spec:
  storageClassName: kubenfs-storage
  dataSource:
    name: ubuntu-img-nfs
    kind: PersistentVolumeClaim
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 30Gi
  • Source PVC
ubuntu-img-nfs             Bound    pvc-fc8e3f1c-e7ce-4712-826b-2f6ad4f3442b   30G           RWX            kubenfs-storage   <unset>                 8m4s
  • Destination PVC
ubuntu-pvc-clone           Bound    pvc-dbea73a4-5a0f-42be-b68c-3c64cd322112   30Gi          RWX            kubenfs-storage   <unset>                 9s
  • Data present in nfs server (Source ubuntu-img-nfs )
root@lenevo-i57g:~# ls -l nfs/kubedata/virtualmachines-ubuntu-img-nfs-pvc-fc8e3f1c-e7ce-4712-826b-2f6ad4f3442b/
total 1544548
-rw-rw---- 1 gluster root 27689746432 Apr 12 10:00 disk.img
  • NO data present in nfs server (Destination ubuntu-pvc-clone )
root@lenevo-i57g:~# ls -l nfs/kubedata/virtualmachines-ubuntu-pvc-clone-pvc-dbea73a4-5a0f-42be-b68c-3c64cd322112/
total 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions