Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imported volume size & Snapshot reserve calculation #722

Open
tgoetheyn opened this issue May 5, 2022 · 2 comments
Open

Imported volume size & Snapshot reserve calculation #722

tgoetheyn opened this issue May 5, 2022 · 2 comments

Comments

@tgoetheyn
Copy link

tgoetheyn commented May 5, 2022

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
@tgoetheyn tgoetheyn added the bug label May 5, 2022
@trumbaut
Copy link

Issue still exists on Trident version 22.10.0 and OpenShift Container Platform 4.11.12 (ONTAP 9.10.1P5).

@amehub
Copy link

amehub commented Apr 14, 2024

Any plans to fix this? In our case if we ever

have to rebuild a cluster then
import hundreds of volumes then
reapply application manifests then
hundreds of pvc manifests will fail because they try to create a pvc smaller than the imported volume. We could modify the application manifests but this would be very time consuming and seriously delay cluster restoration. This not something we would likely consider.

Even if the pvc manifests fail but the deployments etc succeed we would have configuration drift between the manifests and the actual imported pvc sizes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants