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

Can PVC show used/available size? #42465

Closed
harryge00 opened this issue Mar 3, 2017 · 18 comments
Closed

Can PVC show used/available size? #42465

harryge00 opened this issue Mar 3, 2017 · 18 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/storage Categorizes an issue or PR as relevant to SIG Storage.

Comments

@harryge00
Copy link
Contributor

This is a FEATURE REQUEST.

Now persistent volume/persistent volume claims can display capacity. However, I am wondering if PVC can display how much of the capacity is used, and how much is left.

@0xmichalis
Copy link
Contributor

@kubernetes/sig-storage-feature-requests

@0xmichalis 0xmichalis added sig/storage Categorizes an issue or PR as relevant to SIG Storage. kind/feature Categorizes issue or PR as related to a new feature. labels Mar 3, 2017
@jingxu97 jingxu97 self-assigned this Apr 29, 2017
@jingxu97
Copy link
Contributor

I plan to work on this feature, assign to myself.

@killy001
Copy link

does the capacity work well ? when the volume size more than the capacity, there is nothing happened, why?

@jsafrane
Copy link
Member

@killy001, PVC.spec.capacity is user's request for storage, "I want 10 GiB volume". PV.spec.capacity is actual size of the PV. PVC can bind to a bigger PV when there is no smaller available PV, so the user can get actually more than he wants.

Similarly, dynamic provisioning works typically in bigger chunks. So if user asks for 0.5GiB in a PVC, he will get 1 GiB PV because that's the smallest one that AWS can provision.

There is nothing wrong about it.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 31, 2017
@jingxu97
Copy link
Contributor

jingxu97 commented Jan 2, 2018

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 2, 2018
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 2, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 2, 2018
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@codependent
Copy link

/reopen

@k8s-ci-robot
Copy link
Contributor

@codependent: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@nesl247
Copy link

nesl247 commented Dec 18, 2018

This would be really useful.

@killy001
Copy link

killy001 commented Feb 2, 2019

@jsafrane I know what you said, but i am wondering when user actually used more than the binded pv capacity,what will happened?

@jsafrane
Copy link
Member

jsafrane commented Feb 7, 2019

It's up to storage driver to decide. In case of a block volume, write() will probably fail. Kubernetes does not do any checking here.

@halradaideh
Copy link

this feature is needed .. !!!!
@jingxu97

@ntsh999
Copy link

ntsh999 commented Apr 15, 2020

this is a much required feature!

@bakayolo
Copy link

Is there a way to get that information programmatically using the metrics api?

@halradaideh
Copy link

well it depend on the provisioner
for example Ceph have a long workaround to get the size of the image (PV)
i made an integration with Ceph/k8s/Prometheus here https://github.com/halradaideh/size_exporter

I think a DaemonSet replicaset, can have access to the mounted paths on each node, and simple check the size using a Linux utility like DH, then map them to the PVs..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/storage Categorizes an issue or PR as relevant to SIG Storage.
Projects
None yet
Development

No branches or pull requests