这是indexloc提供的服务,不要输入任何密码
Skip to content

Imported volume size & Snapshot reserve calculation #722

@tgoetheyn

Description

@tgoetheyn

Describe the bug
Imported volume doesn't subtract the snapshot size, which causes wrong size of the PVC after import.
Probably related to #611 ?

Environment

  • Trident version: 22.01.1
  • Trident installation flags used: standard with Helm
  • Kubernetes orchestrator: OpenShift v4.9.29
  • OS: RHEL CoreOS 49.84.202204072350-0 (Ootpa)
  • NetApp backend types: ONTAP Version 9.8P4

To Reproduce
Steps to reproduce the behavior:

  • Create a volume 'vol_appdata' with a data size of 10Gb and a snapshot reserve of 5Gb
  • import the volume: tridentctl import volume trident_backend vol_appdata -f pvc-appdata.yaml -n sandbox --no-manage
  • this results in a PVC of 15Gb after import.
+------------------------------------------+--------+---------------+----------+--------------------------------------+--------+---------+
|                   NAME                   |  SIZE  | STORAGE CLASS | PROTOCOL |             BACKEND UUID             | STATE  | MANAGED |
+------------------------------------------+--------+---------------+----------+--------------------------------------+--------+---------+
| pvc-2cedfe60-08a4-467b-b885-594ed7536330 | 15 GiB | trident       | file     | b854c5af-d849-4e52-96b1-8e36f7549fb1 | online | false   |
+------------------------------------------+--------+---------------+----------+--------------------------------------+--------+---------+

Expected behavior
Imported PVC size to only display the usable data size of the volume

Additional context

Content of pvc-appdata.yaml

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: import-test
  namespace: sandbox
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: trident

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions