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

duplicate PV #10

Open
tcoupin opened this issue Jul 15, 2020 · 3 comments
Open

duplicate PV #10

tcoupin opened this issue Jul 15, 2020 · 3 comments

Comments

@tcoupin
Copy link

tcoupin commented Jul 15, 2020

When a pv is used by X multiple pods, it appears X times

$ k get pvc
NAME                                        STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS      AGE
data-drive-preprod-mariadb-galera-0         Bound    pvc-5cb1551b-8958-4c4f-8298-42c8c09ab896   1Gi        RWO            rook-ceph-block   35h
data-drive-preprod-mariadb-tooling-backup   Bound    pvc-6ccbd327-3f9f-4c5a-a70b-3575c19d502b   500Mi      RWX            rook-cephfs       57d
drive-preprod-xxx-nextcloud-ncdata          Bound    pvc-02af006f-b180-4e00-b0f9-d2792b81bdf0   1Gi        RWX            rook-cephfs       57d

$ k df-pv
 NAMESPACE  PVC NAME                                   PV NAME                                   POD NAME                                                         VOLUME MOUNT NAME  SIZE    USED   AVAILABLE  %USED  IUSED  IFREE                 %IUSED
 sandbox    data-drive-preprod-mariadb-galera-0        pvc-5cb1551b-8958-4c4f-8298-42c8c09ab896  drive-preprod-mariadb-galera-0                                   data               1014Mi  704Mi  309Mi      69.51  304    523984                0.06
 sandbox    data-drive-preprod-mariadb-tooling-backup  pvc-6ccbd327-3f9f-4c5a-a70b-3575c19d502b  drive-preprod-mariadb-tooling-restore-shell-c5c585478-wxk5m      mariadb            21Gi    516Mi  21Gi       2.34   33296  18446744073709551615  100.00
 sandbox    drive-preprod-xxx-nextcloud-ncdata         pvc-02af006f-b180-4e00-b0f9-d2792b81bdf0  bckp-nextcloud-preprod-xxx-basic-volume-bckp-restore-shellcfgjx  source             21Gi    516Mi  21Gi       2.34   33296  18446744073709551615  100.00
 sandbox    drive-preprod-xxx-nextcloud-ncdata         pvc-02af006f-b180-4e00-b0f9-d2792b81bdf0  drive-preprod-xxx-nextcloud-7b877b4d78-w6cg8                     data               21Gi    516Mi  21Gi       2.34   33296  18446744073709551615  100.00
@yashbhutwala
Copy link
Owner

@tcoupin thanks for reporting the issue! Granted, I didn't give this much thought, but an argument can be made that it is useful to see it twice to see all the pods that a volume is mounted to. So maybe it's a feature, not a bug? What do you think? What's your usecase?

@tcoupin
Copy link
Author

tcoupin commented Jul 17, 2020

imho, this tool is to view space of PV so I guess only one line by pv. Perhaps you can join all pod names per pv

@sweepchild
Copy link

I agree with @tcoupin it will be nice to focus PV, maybe it can deduplicate same PV's.
Thanks

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

No branches or pull requests

3 participants